Generalize ConvertBits to permit transforming the input
https://github.com/bitcoin/bitcoin/pull/25001/commits/1a72d62152bfdd7c5c2b2704b679f894e7d35e37
Make DecodeBase{32,64} take string_view arguments
https://github.com/bitcoin/bitcoin/pull/25001/commits/8ffbd1412d887535ce5eb613884858c319bd12be
This is a partial backport of core#25001
Depends on D17149