Calculate memory usage correctly for unordered_maps that use PoolAllocator
Summary:
Extracts the resource from a PoolAllocator and uses it for
calculation of the node's memory usage.
This is a partial backport of core#25325
https://github.com/bitcoin/bitcoin/pull/25325/commits/e19943f049ed8aa4f32a1d8440a9fbf160367f0f
with an ARM fix and additional test to make sure the pool is actually used by the nodes from core#28913
Depends on D16175
Test Plan: ninja check
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D16176