script: expose getter for CScriptNum, add a BuildScript helper
script: expose getter for CScriptNum, add a BuildScript helper

Some prep work for Miniscript. BuildScript is an efficient way to build
Scripts in a generic manner (by concatenating OPs, data, and other
Scripts).

Co-Authored-By: Pieter Wuille <53bfd5cb74f62efb4a782b40ad2cf5995a881c7c@wuille.net>

bitcoin/bitcoin,namecoin/namecoin-core,jambolo/bitcoin,sstone/bitcoin,namecoin/namecore,andreaskern/bitcoin,GroestlCoin/bitcoin,namecoin/namecoin-core,bitcoin/bitcoin,fujicoin/fujicoin,jamesob/bitcoin,jlopp/statoshi,AkioNak/bitcoin,bitcoin/bitcoin,sstone/bitcoin,ajtowns/bitcoin,namecoin/namecore,bitcoinsSG/bitcoin,anditto/bitcoin,mruddy/bitcoin,fanquake/bitcoin,andreaskern/bitcoin,GroestlCoin/GroestlCoin,anditto/bitcoin,ajtowns/bitcoin,jambolo/bitcoin,anditto/bitcoin,jamesob/bitcoin,AkioNak/bitcoin,kallewoof/bitcoin,bitcoinsSG/bitcoin,andreaskern/bitcoin,tecnovert/particl-core,particl/particl-core,andreaskern/bitcoin,mruddy/bitcoin,sstone/bitcoin,fujicoin/fujicoin,dscotese/bitcoin,tecnovert/particl-core,particl/particl-core,namecoin/namecore,jlopp/statoshi,kallewoof/bitcoin,fanquake/bitcoin,jamesob/bitcoin,kallewoof/bitcoin,bitcoin/bitcoin,lateminer/bitcoin,instagibbs/bitcoin,domob1812/bitcoin,jamesob/bitcoin,dscotese/bitcoin,sipsorcery/bitcoin,dscotese/bitcoin,AkioNak/bitcoin,bitcoinsSG/bitcoin,mruddy/bitcoin,domob1812/bitcoin,namecoin/namecore,namecoin/namecore,kallewoof/bitcoin,jambolo/bitcoin,GroestlCoin/bitcoin,ajtowns/bitcoin,fanquake/bitcoin,fanquake/bitcoin,particl/particl-core,lateminer/bitcoin,particl/particl-core,namecoin/namecoin-core,sipsorcery/bitcoin,andreaskern/bitcoin,jambolo/bitcoin,GroestlCoin/GroestlCoin,jamesob/bitcoin,Xekyo/bitcoin,GroestlCoin/bitcoin,andreaskern/bitcoin,Xekyo/bitcoin,GroestlCoin/bitcoin,ajtowns/bitcoin,particl/particl-core,AkioNak/bitcoin,GroestlCoin/GroestlCoin,namecoin/namecoin-core,kallewoof/bitcoin,mruddy/bitcoin,bitcoinsSG/bitcoin,lateminer/bitcoin,bitcoinsSG/bitcoin,anditto/bitcoin,GroestlCoin/GroestlCoin,dscotese/bitcoin,fujicoin/fujicoin,GroestlCoin/bitcoin,Xekyo/bitcoin,instagibbs/bitcoin,bitcoin/bitcoin,fujicoin/fujicoin,tecnovert/particl-core,bitcoinsSG/bitcoin,anditto/bitcoin,namecoin/namecoin-core,lateminer/bitcoin,namecoin/namecoin-core,GroestlCoin/bitcoin,fanquake/bitcoin,domob1812/bitcoin,fujicoin/fujicoin,particl/particl-core,ajtowns/bitcoin,GroestlCoin/GroestlCoin,AkioNak/bitcoin,sipsorcery/bitcoin,dscotese/bitcoin,GroestlCoin/GroestlCoin,jlopp/statoshi,instagibbs/bitcoin,ajtowns/bitcoin,lateminer/bitcoin,jlopp/statoshi,instagibbs/bitcoin,domob1812/bitcoin,instagibbs/bitcoin,Xekyo/bitcoin,lateminer/bitcoin,jlopp/statoshi,anditto/bitcoin,fanquake/bitcoin,jambolo/bitcoin,kallewoof/bitcoin,domob1812/bitcoin,sstone/bitcoin,Xekyo/bitcoin,tecnovert/particl-core,sipsorcery/bitcoin,jlopp/statoshi,jambolo/bitcoin,sipsorcery/bitcoin,domob1812/bitcoin,bitcoin/bitcoin,Xekyo/bitcoin,sstone/bitcoin,jamesob/bitcoin,tecnovert/particl-core,instagibbs/bitcoin,mruddy/bitcoin,fujicoin/fujicoin,sipsorcery/bitcoin,AkioNak/bitcoin,namecoin/namecore,dscotese/bitcoin,tecnovert/particl-core,sstone/bitcoin,mruddy/bitcoin