Changes in #12048 cause a compilation error in Arena::walk() when
ARENA_DEBUG is defined. Specifically, Arena's chunks_free map was
changed to have a different value type.
Additionally, missing includes cause other compilation errors when
ARENA_DEBUG is defined.
Second commit fixes segfault in allocator_tests/arena_tests
The test uses reinterpret_cast<void*> on unallocated memory. Using this
memory in printchunk as char* causes a segfault, so have printchunk take
void* instead.
Reproduced with:
make CPPFLAGS=-DARENA_DEBUG
Backport of Core PR16161
https://github.com/bitcoin/bitcoin/pull/16161/commits/ad715488222f2f2ce2e2cff632eae94fd49ea9c5
https://github.com/bitcoin/bitcoin/pull/16161/commits/30fb598737f6efb7802d707a1fa989872e7f8b7b
Depends on D3898