Refactor TestFramework main() into setup/shutdown
Refactor TestFramework main() into setup/shutdown

Setup and shutdown code now moved into dedicated methods. Test "success" is
added as a BitcoinTestFramework member, which can be accessed outside of main.
Argument parsing also moved into separate method and called from main.

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