Move ipfs database in a separate lib
The datapod currently contains a kind of key/value database with functions like:
async function* getAll(cid: CID): AsyncIterable<CID[]>
async function* getDiff(cid1: CID, cid2: CID): AsyncIterable<CID[]>
async function processInode(node: IndexInode, key: string, func: ProcessFunction): Promise<CID>
async function mergeInodesSync(nodeA: IndexInode | IndexLeaf, nodeB: IndexVinode | IndexLeaf): Promise<CID>
This kv database lacks features like deletion, refcounting, metrics, and have hardcoded base (16 at the moment), and hardcoded inode structure (dag-cbor children/leaf objects).
It could be abstracted away from the datapod and well tested. It could take inspiration from orbitdb that share some common features.