Env: use tezos-storage.context instead of implementing a new memory context
This MR splits the context hash encoding into a separate library (tezos-storage.encoding) and use irmin-mem to implement memory_context.ml, instead of reimplementing a new in-memory context.
depends on:
- !2488 (closed)(update to irmin 2.3)
- !2461 (merged) (refactor lib-storage signatures)
- !2440 (merged) (Improve the context API)
- !2543 (merged) (remove dead-code in lib_storage)
The end-goal (not done in this MR) is to expose the tree hashes into the protocol, as suggested by !2440 (comment 482181038). It's impossible to do so with the current implementation of memory_context.ml as it needs to know how to serialize directories and values to generate the context hash.
Edited by Thomas Gazagnaire