Extracts the resource from a PoolAllocator and uses it for
calculation of the node's memory usage.
This is a partial backport of [[https://github.com/bitcoin/bitcoin/pull/25325 | 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 [[https://github.com/bitcoin/bitcoin/pull/28913 | core#28913]]