praekelt/vumi — pull request #844 by jerith (2014-08-29 09:47:44+00:00)
Title: Fix counter-based events and messages in message store cache

Three things are broken here:
* We don't actually increment the event counter when adding an event to the cache.
* We reconcile inbound messages before outbound, which may cause problems with new events arriving during recon. (Unconfirmed, but it's the only explanation I can think of.)
* We increment counters whether we've seen a message before or not.