Add module hooks for "block added" and "block reverted"
It could be very useful for new modules (like https://forum.duniter.org/t/articles-explicatifs-techniques-sur-duniter/3947/15) to be notified when a block is added or reverted, in order to update module's specific tables, i.e. intermediary tables that store computed data for example.
Indeed, if a new API wanted to be very quick, it could want to make computations and store the results to retrieve them on each request, instead of making again the computation on each request.
We could differenciate 4 types of hooks:
- async, non-blocking hook on block add
- async, non-blocking hook on block revert
- sync, blocking hook on block add
- sync, blocking hook on block revert
To be as much non-invasive as possible, a module would prefer async hooks. But if the module required some data from Duniter tables, it may prefer to be blocking to benefit from fresh, coherent regarding the added block.