KTree for chain resolving; cleanup of blockchain

1. Added a tree data structure to store blocks and to help resolve
chain forks.
2. Package “blockchain” refactoring, blockchain/cold for old static
blocks, and hot for newly mined blocks