reparse speedup, messages desync fix

Reparse is supersonic now. **Was 80 mins, now takes 5 mins.**

The 'BUG: MESSAGE RECEIVED NOT WHAT WE EXPECTED' with this patch triggers a deeper-than-usual reorg instead of just skipping messages which could cause dangling assets, orders etc.

Taken from https://github.com/ClearingHouse/clearblockd/pull/9

@reorder can you please check the cherry-pick was done correctly.