Store messages after processing

Move the store_message() call to after the apply_gag()ing and message
routing has been done. That way the message will still be replayed with
a gag applied after a server restart.
1 job for master in 7 minutes and 28 seconds (queued for 9 seconds)