This PR contains some of the changes left as TODO in #11167 (and built on top of that PR). They are not intended for backporting.
This removes the CBase58, CBitcoinSecret, CBitcoinExtKey, and CBitcoinExtPubKey classes, in favor of simple Encode/Decode functions. Furthermore, all Bitcoin-specific logic (addresses, WIF, BIP32) is moved to key_io.{h,cpp}, leaving base58.{h,cpp} as a pure utility that implements the base58 encoding/decoding logic.