Backport PR17455
---
Backport note:
This was run using the fix from D5232, to avoid any problems from the
fork process.
I've run the same generator and the only thing it turns up currently
is the LogInstance reachable leak (which is intentional, see logger.cpp).
However it's likely we'll see the other reachable leaks appear in
future backports, so might as well include them now.
Result valgrinding test_bitcoin shows no leaks after suppressions:
```
==28408== HEAP SUMMARY:
==28408== in use at exit: 1,088 bytes in 5 blocks
==28408== total heap usage: 182,020,544 allocs, 182,020,539 frees, 31,333,403,759 bytes allocated
```
We do have some leaks in bench-bitcoin CoinSelection test, likely
need PR14822.
Depends on D5232 / other similar fix