This PR allows the indexer to resume from a previous index database.
When a checkpoint is not provided and there is no index database, it informs the user that the checkpoint must be provided to bootstrap a new index database.
When a checkpoint is provided and there already is an index database, it informs the user that they must use the force flag to bootstrap over an existing database.
It will initialize an index loader, which loads a state execution trie from an existing index database, by retrieving all paths and payloads from the index database and inserting them in a trie; this is the default mode for the mapper.
When a checkpoint is provided, it will replace this loader with a checkpoint root trie loader, which will load the execution state trie from the checkpoint, and set the bootstrap flag on the mapper to bootstrap instead of resuming.
The storage layer of the index loader is implemented by iterating in reverse through all registers; as the keys are ordered by increasing path and then increasing height, it means we will always hit the biggest height for a register path first, and we use this to skip all other values for the same path.
Goal of this PR
Fixes #79.
This PR allows the indexer to resume from a previous index database.
Checklist