Add WriteHDKeypath function and move *HDKeypath to util/bip32.{h,cpp}
Summary:
Creates new files util/bip32.h and util/bip32.cpp for containing
BIP 32 stuff.
Moves FormatKeyPath from descriptor.cpp to util/bip32.
Adds a wrapper around it to prepent the 'm' for when just the
BIP 32 style keypath is needed.
Partial backport of Core PR14021
https://github.com/bitcoin/bitcoin/pull/14021/commits/e7652d3f64212a6af68fc7d788411d28fcbdbd0a
Depends on D6004
Test Plan:
../configure --enable-deprecated-build-system make check ninja ninja check test_runner.py
Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien
Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D6204