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.

sipsorcery/bitcoin,dscotese/bitcoin,bitcoin/bitcoin,qtumproject/qtum,Sjors/bitcoin,rnicoll/dogecoin,mruddy/bitcoin,namecoin/namecoin-core,qtumproject/qtum,MarcoFalke/bitcoin,bitcoinsSG/bitcoin,bitcoin/bitcoin,achow101/bitcoin,jlopp/statoshi,ajtowns/bitcoin,fanquake/bitcoin,bitcoin/bitcoin,ElementsProject/elements,cdecker/bitcoin,dscotese/bitcoin,pataquets/namecoin-core,JeremyRubin/bitcoin,MeshCollider/bitcoin,bitcoin/bitcoin,jambolo/bitcoin,andreaskern/bitcoin,kallewoof/bitcoin,qtumproject/qtum,andreaskern/bitcoin,ajtowns/bitcoin,ElementsProject/elements,EthanHeilman/bitcoin,fanquake/bitcoin,dscotese/bitcoin,yenliangl/bitcoin,practicalswift/bitcoin,domob1812/bitcoin,jambolo/bitcoin,apoelstra/bitcoin,practicalswift/bitcoin,cdecker/bitcoin,pstratem/bitcoin,yenliangl/bitcoin,alecalve/bitcoin,prusnak/bitcoin,MeshCollider/bitcoin,mruddy/bitcoin,cdecker/bitcoin,domob1812/namecore,namecoin/namecore,sstone/bitcoin,fujicoin/fujicoin,dscotese/bitcoin,jamesob/bitcoin,qtumproject/qtum,rnicoll/bitcoin,jamesob/bitcoin,yenliangl/bitcoin,Sjors/bitcoin,fanquake/bitcoin,yenliangl/bitcoin,EthanHeilman/bitcoin,jlopp/statoshi,EthanHeilman/bitcoin,apoelstra/bitcoin,bitcoin/bitcoin,sipsorcery/bitcoin,GroestlCoin/GroestlCoin,cdecker/bitcoin,andreaskern/bitcoin,litecoin-project/litecoin,bitcoinsSG/bitcoin,GroestlCoin/GroestlCoin,jamesob/bitcoin,ElementsProject/elements,rnicoll/dogecoin,particl/particl-core,fanquake/bitcoin,tecnovert/particl-core,namecoin/namecoin-core,tecnovert/particl-core,domob1812/bitcoin,n1bor/bitcoin,kallewoof/bitcoin,kallewoof/bitcoin,achow101/bitcoin,GroestlCoin/GroestlCoin,rnicoll/dogecoin,AkioNak/bitcoin,sstone/bitcoin,sstone/bitcoin,rnicoll/bitcoin,instagibbs/bitcoin,GroestlCoin/GroestlCoin,jambolo/bitcoin,MarcoFalke/bitcoin,jnewbery/bitcoin,pataquets/namecoin-core,jlopp/statoshi,JeremyRubin/bitcoin,pstratem/bitcoin,anditto/bitcoin,dscotese/bitcoin,prusnak/bitcoin,GroestlCoin/bitcoin,anditto/bitcoin,yenliangl/bitcoin,practicalswift/bitcoin,alecalve/bitcoin,ElementsProject/elements,domob1812/namecore,kallewoof/bitcoin,andreaskern/bitcoin,JeremyRubin/bitcoin,rnicoll/dogecoin,Xekyo/bitcoin,tecnovert/particl-core,cdecker/bitcoin,jambolo/bitcoin,fujicoin/fujicoin,namecoin/namecoin-core,Xekyo/bitcoin,bitcoinknots/bitcoin,ajtowns/bitcoin,particl/particl-core,AkioNak/bitcoin,qtumproject/qtum,jnewbery/bitcoin,namecoin/namecore,jambolo/bitcoin,n1bor/bitcoin,lateminer/bitcoin,MarcoFalke/bitcoin,fujicoin/fujicoin,yenliangl/bitcoin,JeremyRubin/bitcoin,Xekyo/bitcoin,pstratem/bitcoin,GroestlCoin/bitcoin,prusnak/bitcoin,particl/particl-core,Sjors/bitcoin,fujicoin/fujicoin,practicalswift/bitcoin,namecoin/namecoin-core,prusnak/bitcoin,MeshCollider/bitcoin,lateminer/bitcoin,bitcoinknots/bitcoin,jnewbery/bitcoin,ElementsProject/elements,Sjors/bitcoin,instagibbs/bitcoin,tecnovert/particl-core,sipsorcery/bitcoin,apoelstra/bitcoin,n1bor/bitcoin,rnicoll/dogecoin,domob1812/bitcoin,GroestlCoin/bitcoin,bitcoinknots/bitcoin,fujicoin/fujicoin,domob1812/namecore,Xekyo/bitcoin,mm-s/bitcoin,instagibbs/bitcoin,fujicoin/fujicoin,mm-s/bitcoin,domob1812/bitcoin,pataquets/namecoin-core,jamesob/bitcoin,GroestlCoin/bitcoin,tecnovert/particl-core,bitcoinsSG/bitcoin,JeremyRubin/bitcoin,mm-s/bitcoin,n1bor/bitcoin,prusnak/bitcoin,MarcoFalke/bitcoin,jlopp/statoshi,lateminer/bitcoin,namecoin/namecore,prusnak/bitcoin,pstratem/bitcoin,fanquake/bitcoin,domob1812/namecore,jnewbery/bitcoin,cdecker/bitcoin,practicalswift/bitcoin,jamesob/bitcoin,Xekyo/bitcoin,jlopp/statoshi,jonasschnelli/bitcoin,AkioNak/bitcoin,anditto/bitcoin,bitcoinsSG/bitcoin,MeshCollider/bitcoin,rnicoll/bitcoin,namecoin/namecoin-core,namecoin/namecore,apoelstra/bitcoin,jonasschnelli/bitcoin,alecalve/bitcoin,bitcoinknots/bitcoin,mruddy/bitcoin,EthanHeilman/bitcoin,tecnovert/particl-core,lateminer/bitcoin,EthanHeilman/bitcoin,kallewoof/bitcoin,ajtowns/bitcoin,EthanHeilman/bitcoin,GroestlCoin/bitcoin,alecalve/bitcoin,pataquets/namecoin-core,ajtowns/bitcoin,MarcoFalke/bitcoin,anditto/bitcoin,GroestlCoin/GroestlCoin,bitcoinknots/bitcoin,rnicoll/bitcoin,MarcoFalke/bitcoin,AkioNak/bitcoin,litecoin-project/litecoin,domob1812/bitcoin,apoelstra/bitcoin,litecoin-project/litecoin,litecoin-project/litecoin,jnewbery/bitcoin,GroestlCoin/bitcoin,instagibbs/bitcoin,jamesob/bitcoin,pstratem/bitcoin,mm-s/bitcoin,bitcoinsSG/bitcoin,n1bor/bitcoin,GroestlCoin/GroestlCoin,andreaskern/bitcoin,particl/particl-core,andreaskern/bitcoin,jonasschnelli/bitcoin,rnicoll/bitcoin,sipsorcery/bitcoin,n1bor/bitcoin,mruddy/bitcoin,bitcoin/bitcoin,jonasschnelli/bitcoin,bitcoinsSG/bitcoin,lateminer/bitcoin,namecoin/namecoin-core,fanquake/bitcoin,litecoin-project/litecoin,JeremyRubin/bitcoin,achow101/bitcoin,namecoin/namecore,lateminer/bitcoin,jlopp/statoshi,dscotese/bitcoin,achow101/bitcoin,Xekyo/bitcoin,pstratem/bitcoin,kallewoof/bitcoin,mm-s/bitcoin,qtumproject/qtum,anditto/bitcoin,jonasschnelli/bitcoin,Sjors/bitcoin,sstone/bitcoin,AkioNak/bitcoin,ElementsProject/elements,particl/particl-core,domob1812/namecore,pataquets/namecoin-core,alecalve/bitcoin,mm-s/bitcoin,pataquets/namecoin-core,jambolo/bitcoin,achow101/bitcoin,particl/particl-core,AkioNak/bitcoin,mruddy/bitcoin,litecoin-project/litecoin,domob1812/namecore,instagibbs/bitcoin,ajtowns/bitcoin,practicalswift/bitcoin,MeshCollider/bitcoin,MeshCollider/bitcoin,apoelstra/bitcoin,namecoin/namecore,instagibbs/bitcoin,sipsorcery/bitcoin,domob1812/bitcoin,anditto/bitcoin,mruddy/bitcoin,sstone/bitcoin,rnicoll/bitcoin,achow101/bitcoin,sipsorcery/bitcoin,qtumproject/qtum,alecalve/bitcoin,sstone/bitcoin