This commit makes the chain state (block index map and active chain) const outside of validation. The steps are:
- Add helpers to get a
const&of the chain state - Add helpers to get a mutable reference of them to be only used in tests
- Remove
mapBlockIndexfrom the header and markchainActive"to be removed"