In order to speed up the available coins retrieval,
the aggregated_amounts table is created, here we store
the total available coins which can be retrieved fast.
This is a simplified version of the BlockEventProcessor, it handles
the synchronization between the xsn and our ledger database, it also
takes care of a lot of corner cases to keep the synchronization process
flexible enough and linear.