rpc: deduplicate WriteHDKeypath() used in decodepsbt
rpc: deduplicate WriteHDKeypath() used in decodepsbt

The functionality is already provided in the BIP32 utility library util/bip32.h
with the exact same name and function signature.


Former-commit-id: 484954d852a9f25cd867b77097f834a931b5ac53
syscoin/syscoin,syscoin/syscoin,syscoin/syscoin,syscoin/syscoin,syscoin/syscoin,syscoin/syscoin,syscoin/syscoin,syscoin/syscoin