Accurately account for mempool index memory
This introduces a C++ allocator class (memusage::AccountingAllocator) which enables containers that accurately account for all their memory allocations in a tracker variable.
This is then used to replace the heuristics in the mempool to guess memory usage.