Partial backport of core PR14954 (commit fab5a1e):
https://github.com/bitcoin/bitcoin/pull/14954/commits/fab5a1e0f492f920270c661954802749dfac5fa1
Note: the depends README change is not backported because it has
dependencies that will be added later.