Rework of the mechanism for applying a block
Application of a chainable block (at start or cautious sync):
- Local verification
- Indexation : generate protocol indexes
- Global verification
- Transforming protocol Indexes into persisted indexes
- Open a new write transaction
- Writing persisted indexes in a write transaction
- Merge (commit write transaction)
Application of a chainable block (at fast sync): skip steps 1 and 3.
Application of a chainable block in the context of a rollback: skip steps 5 and 7 (The transaction will be committed by the caller only at the end of the rollback if all the blocks of the new branch are valid).
EDIT: No longer specificity for rollback, see #196.
Required to complete #164 (closed) beforehand.