Fix rescan test failure due to unset g_address_type, g_change_type
Fix rescan test failure due to unset g_address_type, g_change_type

New global variables were introduced in #11403 and not setting them causes:

    test_bitcoin: wallet/wallet.cpp:4259: CTxDestination GetDestinationForKey(const CPubKey&, OutputType): Assertion `false' failed.
    unknown location(0): fatal error in "importwallet_rescan": signal: SIGABRT (application abort requested)

It's possible to reproduce the failure reliably by running:

    src/test/test_bitcoin --log_level=test_suite --run_test=wallet_tests/importwallet_rescan

Failures happen nondeterministically because boost test framework doesn't run
tests in a specified order, and tests that run previously can set the global
variables and mask the bug.

pstratem/bitcoin,prusnak/bitcoin,FeatherCoin/Feathercoin,mm-s/bitcoin,tjps/bitcoin,jmcorgan/bitcoin,r8921039/bitcoin,joshrabinowitz/bitcoin,sebrandon1/bitcoin,untrustbank/litecoin,ElementsProject/elements,mitchellcash/bitcoin,r8921039/bitcoin,TheBlueMatt/bitcoin,vmp32k/litecoin,sstone/bitcoin,n1bor/bitcoin,AkioNak/bitcoin,myriadcoin/myriadcoin,FeatherCoin/Feathercoin,FeatherCoin/Feathercoin,jambolo/bitcoin,donaloconnor/bitcoin,monacoinproject/monacoin,AkioNak/bitcoin,ahmedbodi/vertcoin,midnightmagic/bitcoin,ajtowns/bitcoin,jamesob/bitcoin,jonasschnelli/bitcoin,globaltoken/globaltoken,particl/particl-core,Kogser/bitcoin,monacoinproject/monacoin,MeshCollider/bitcoin,JeremyRubin/bitcoin,CryptArc/bitcoin,GroestlCoin/GroestlCoin,instagibbs/bitcoin,Bushstar/UFO-Project,domob1812/bitcoin,particl/particl-core,lateminer/bitcoin,sipsorcery/bitcoin,pataquets/namecoin-core,pataquets/namecoin-core,jtimon/bitcoin,rnicoll/dogecoin,namecoin/namecoin-core,r8921039/bitcoin,paveljanik/bitcoin,gjhiggins/vcoincore,pstratem/bitcoin,n1bor/bitcoin,kallewoof/bitcoin,namecoin/namecore,jambolo/bitcoin,nikkitan/bitcoin,fanquake/bitcoin,Kogser/bitcoin,MeshCollider/bitcoin,lateminer/bitcoin,sstone/bitcoin,practicalswift/bitcoin,mm-s/bitcoin,DigitalPandacoin/pandacoin,Kogser/bitcoin,wellenreiter01/Feathercoin,tjps/bitcoin,Bushstar/UFO-Project,sipsorcery/bitcoin,jtimon/bitcoin,jonasschnelli/bitcoin,myriadteam/myriadcoin,Xekyo/bitcoin,mm-s/bitcoin,myriadteam/myriadcoin,Flowdalic/bitcoin,bitcoin/bitcoin,mruddy/bitcoin,ajtowns/bitcoin,namecoin/namecoin-core,stamhe/bitcoin,joshrabinowitz/bitcoin,Xekyo/bitcoin,vmp32k/litecoin,nikkitan/bitcoin,qtumproject/qtum,jlopp/statoshi,OmniLayer/omnicore,qtumproject/qtum,bespike/litecoin,anditto/bitcoin,domob1812/huntercore,Kogser/bitcoin,alecalve/bitcoin,litecoin-project/litecoin,h4x3rotab/BTCGPU,BTCGPU/BTCGPU,mruddy/bitcoin,peercoin/peercoin,globaltoken/globaltoken,rawodb/bitcoin,namecoin/namecore,joshrabinowitz/bitcoin,globaltoken/globaltoken,namecoin/namecore,particl/particl-core,cdecker/bitcoin,myriadcoin/myriadcoin,GroestlCoin/bitcoin,ryanofsky/bitcoin,h4x3rotab/BTCGPU,qtumproject/qtum,digibyte/digibyte,RHavar/bitcoin,rnicoll/bitcoin,bespike/litecoin,yenliangl/bitcoin,pataquets/namecoin-core,donaloconnor/bitcoin,AkioNak/bitcoin,mitchellcash/bitcoin,myriadcoin/myriadcoin,fanquake/bitcoin,wellenreiter01/Feathercoin,anditto/bitcoin,TheBlueMatt/bitcoin,lbryio/lbrycrd,jlopp/statoshi,fujicoin/fujicoin,cdecker/bitcoin,domob1812/namecore,tecnovert/particl-core,bitcoinknots/bitcoin,achow101/bitcoin,rnicoll/dogecoin,anditto/bitcoin,vertcoin/vertcoin,n1bor/bitcoin,ericshawlinux/bitcoin,OmniLayer/omnicore,tjps/bitcoin,globaltoken/globaltoken,lateminer/bitcoin,DigitalPandacoin/pandacoin,TheBlueMatt/bitcoin,EthanHeilman/bitcoin,mitchellcash/bitcoin,mm-s/bitcoin,wellenreiter01/Feathercoin,Christewart/bitcoin,wellenreiter01/Feathercoin,Xekyo/bitcoin,GroestlCoin/bitcoin,droark/bitcoin,cdecker/bitcoin,monacoinproject/monacoin,ryanofsky/bitcoin,domob1812/bitcoin,ryanofsky/bitcoin,afk11/bitcoin,dscotese/bitcoin,domob1812/huntercore,jmcorgan/bitcoin,fujicoin/fujicoin,andreaskern/bitcoin,EthanHeilman/bitcoin,droark/bitcoin,jtimon/bitcoin,MarcoFalke/bitcoin,Flowdalic/bitcoin,bitcoinsSG/bitcoin,alecalve/bitcoin,alecalve/bitcoin,jnewbery/bitcoin,tjps/bitcoin,midnightmagic/bitcoin,sebrandon1/bitcoin,afk11/bitcoin,h4x3rotab/BTCGPU,jamesob/bitcoin,dscotese/bitcoin,jamesob/bitcoin,particl/particl-core,particl/particl-core,GroestlCoin/GroestlCoin,peercoin/peercoin,gjhiggins/vcoincore,gjhiggins/vcoincore,alecalve/bitcoin,OmniLayer/omnicore,andreaskern/bitcoin,FeatherCoin/Feathercoin,EthanHeilman/bitcoin,thrasher-/litecoin,bitcoin/bitcoin,domob1812/namecore,Flowdalic/bitcoin,bitcoin/bitcoin,GlobalBoost/GlobalBoost,Xekyo/bitcoin,lateminer/bitcoin,RHavar/bitcoin,Sjors/bitcoin,digibyte/digibyte,wellenreiter01/Feathercoin,thrasher-/litecoin,ericshawlinux/bitcoin,instagibbs/bitcoin,sipsorcery/bitcoin,GroestlCoin/GroestlCoin,paveljanik/bitcoin,BTCGPU/BTCGPU,lbryio/lbrycrd,digibyte/digibyte,jambolo/bitcoin,guncoin/guncoin,Xekyo/bitcoin,jlopp/statoshi,midnightmagic/bitcoin,droark/bitcoin,monacoinproject/monacoin,EthanHeilman/bitcoin,peercoin/peercoin,fujicoin/fujicoin,domob1812/namecore,practicalswift/bitcoin,MeshCollider/bitcoin,anditto/bitcoin,bitcoinknots/bitcoin,apoelstra/bitcoin,achow101/bitcoin,myriadcoin/myriadcoin,DigitalPandacoin/pandacoin,Kogser/bitcoin,jmcorgan/bitcoin,sipsorcery/bitcoin,practicalswift/bitcoin,Kogser/bitcoin,namecoin/namecore,JeremyRubin/bitcoin,CryptArc/bitcoin,jnewbery/bitcoin,domob1812/bitcoin,domob1812/huntercore,yenliangl/bitcoin,JeremyRubin/bitcoin,midnightmagic/bitcoin,randy-waterhouse/bitcoin,ElementsProject/elements,jonasschnelli/bitcoin,MarcoFalke/bitcoin,ahmedbodi/vertcoin,jonasschnelli/bitcoin,domob1812/huntercore,tjps/bitcoin,mruddy/bitcoin,peercoin/peercoin,yenliangl/bitcoin,kallewoof/bitcoin,fujicoin/fujicoin,lbryio/lbrycrd,bitcoin/bitcoin,donaloconnor/bitcoin,thrasher-/litecoin,vertcoin/vertcoin,ryanofsky/bitcoin,randy-waterhouse/bitcoin,bitcoinsSG/bitcoin,kallewoof/bitcoin,ericshawlinux/bitcoin,bespike/litecoin,CryptArc/bitcoin,kazcw/bitcoin,domob1812/namecore,wellenreiter01/Feathercoin,instagibbs/bitcoin,bespike/litecoin,jambolo/bitcoin,pstratem/bitcoin,jamesob/bitcoin,GlobalBoost/GlobalBoost,lbryio/lbrycrd,sstone/bitcoin,mm-s/bitcoin,ericshawlinux/bitcoin,domob1812/huntercore,lbryio/lbrycrd,anditto/bitcoin,GroestlCoin/bitcoin,GroestlCoin/bitcoin,guncoin/guncoin,afk11/bitcoin,ElementsProject/elements,stamhe/bitcoin,donaloconnor/bitcoin,vertcoin/vertcoin,ericshawlinux/bitcoin,sebrandon1/bitcoin,namecoin/namecore,cdecker/bitcoin,untrustbank/litecoin,lateminer/bitcoin,jnewbery/bitcoin,untrustbank/litecoin,alecalve/bitcoin,prusnak/bitcoin,Bushstar/UFO-Project,sebrandon1/bitcoin,EthanHeilman/bitcoin,DigitalPandacoin/pandacoin,ahmedbodi/vertcoin,ajtowns/bitcoin,myriadteam/myriadcoin,bitcoin/bitcoin,jambolo/bitcoin,untrustbank/litecoin,droark/bitcoin,rawodb/bitcoin,ElementsProject/elements,MarcoFalke/bitcoin,mm-s/bitcoin,myriadteam/myriadcoin,CryptArc/bitcoin,prusnak/bitcoin,mitchellcash/bitcoin,Bushstar/UFO-Project,pataquets/namecoin-core,tecnovert/particl-core,OmniLayer/omnicore,monacoinproject/monacoin,CryptArc/bitcoin,r8921039/bitcoin,sipsorcery/bitcoin,Flowdalic/bitcoin,nikkitan/bitcoin,AkioNak/bitcoin,bitcoinknots/bitcoin,litecoin-project/litecoin,apoelstra/bitcoin,andreaskern/bitcoin,pstratem/bitcoin,jlopp/statoshi,afk11/bitcoin,stamhe/bitcoin,GroestlCoin/GroestlCoin,jlopp/statoshi,jmcorgan/bitcoin,mruddy/bitcoin,sebrandon1/bitcoin,joshrabinowitz/bitcoin,vmp32k/litecoin,thrasher-/litecoin,untrustbank/litecoin,thrasher-/litecoin,litecoin-project/litecoin,Xekyo/bitcoin,nikkitan/bitcoin,andreaskern/bitcoin,ahmedbodi/vertcoin,GlobalBoost/GlobalBoost,DigitalPandacoin/pandacoin,JeremyRubin/bitcoin,MarcoFalke/bitcoin,rawodb/bitcoin,paveljanik/bitcoin,TheBlueMatt/bitcoin,apoelstra/bitcoin,jtimon/bitcoin,rnicoll/bitcoin,yenliangl/bitcoin,MeshCollider/bitcoin,practicalswift/bitcoin,GlobalBoost/GlobalBoost,GroestlCoin/GroestlCoin,achow101/bitcoin,rawodb/bitcoin,ryanofsky/bitcoin,gjhiggins/vcoincore,Bushstar/UFO-Project,prusnak/bitcoin,r8921039/bitcoin,Christewart/bitcoin,apoelstra/bitcoin,GroestlCoin/bitcoin,MarcoFalke/bitcoin,jnewbery/bitcoin,digibyte/digibyte,namecoin/namecoin-core,prusnak/bitcoin,guncoin/guncoin,tecnovert/particl-core,sipsorcery/bitcoin,MeshCollider/bitcoin,digibyte/digibyte,BTCGPU/BTCGPU,achow101/bitcoin,JeremyRubin/bitcoin,Sjors/bitcoin,achow101/bitcoin,kallewoof/bitcoin,ajtowns/bitcoin,nikkitan/bitcoin,midnightmagic/bitcoin,vertcoin/vertcoin,gjhiggins/vcoincore,mitchellcash/bitcoin,qtumproject/qtum,donaloconnor/bitcoin,droark/bitcoin,jlopp/statoshi,FeatherCoin/Feathercoin,myriadteam/myriadcoin,Christewart/bitcoin,namecoin/namecoin-core,paveljanik/bitcoin,joshrabinowitz/bitcoin,globaltoken/globaltoken,FeatherCoin/Feathercoin,peercoin/peercoin,n1bor/bitcoin,lateminer/bitcoin,bitcoinsSG/bitcoin,GroestlCoin/bitcoin,r8921039/bitcoin,cdecker/bitcoin,untrustbank/litecoin,cdecker/bitcoin,monacoinproject/monacoin,kazcw/bitcoin,paveljanik/bitcoin,RHavar/bitcoin,ryanofsky/bitcoin,OmniLayer/omnicore,Kogser/bitcoin,GlobalBoost/GlobalBoost,MeshCollider/bitcoin,rnicoll/dogecoin,sstone/bitcoin,GroestlCoin/GroestlCoin,lbryio/lbrycrd,stamhe/bitcoin,paveljanik/bitcoin,dscotese/bitcoin,stamhe/bitcoin,litecoin-project/litecoin,jmcorgan/bitcoin,kazcw/bitcoin,jtimon/bitcoin,randy-waterhouse/bitcoin,vmp32k/litecoin,Kogser/bitcoin,rnicoll/bitcoin,sebrandon1/bitcoin,jambolo/bitcoin,apoelstra/bitcoin,pstratem/bitcoin,Bushstar/UFO-Project,instagibbs/bitcoin,peercoin/peercoin,vertcoin/vertcoin,litecoin-project/litecoin,vmp32k/litecoin,rawodb/bitcoin,BTCGPU/BTCGPU,anditto/bitcoin,fujicoin/fujicoin,yenliangl/bitcoin,kazcw/bitcoin,kallewoof/bitcoin,mruddy/bitcoin,Sjors/bitcoin,domob1812/namecore,Christewart/bitcoin,Flowdalic/bitcoin,yenliangl/bitcoin,qtumproject/qtum,nikkitan/bitcoin,vmp32k/litecoin,myriadcoin/myriadcoin,rawodb/bitcoin,ahmedbodi/vertcoin,rnicoll/bitcoin,tecnovert/particl-core,TheBlueMatt/bitcoin,Christewart/bitcoin,ericshawlinux/bitcoin,randy-waterhouse/bitcoin,BTCGPU/BTCGPU,pataquets/namecoin-core,prusnak/bitcoin,bitcoinsSG/bitcoin,Sjors/bitcoin,n1bor/bitcoin,randy-waterhouse/bitcoin,instagibbs/bitcoin,thrasher-/litecoin,guncoin/guncoin,rnicoll/bitcoin,bitcoinsSG/bitcoin,GlobalBoost/GlobalBoost,apoelstra/bitcoin,ElementsProject/elements,domob1812/bitcoin,dscotese/bitcoin,ajtowns/bitcoin,namecoin/namecoin-core,CryptArc/bitcoin,jnewbery/bitcoin,EthanHeilman/bitcoin,ahmedbodi/vertcoin,fanquake/bitcoin,bespike/litecoin,litecoin-project/litecoin,jamesob/bitcoin,afk11/bitcoin,rnicoll/bitcoin,Flowdalic/bitcoin,globaltoken/globaltoken,practicalswift/bitcoin,kazcw/bitcoin,pataquets/namecoin-core,dscotese/bitcoin,AkioNak/bitcoin,lbryio/lbrycrd,droark/bitcoin,joshrabinowitz/bitcoin,h4x3rotab/BTCGPU,kallewoof/bitcoin,myriadteam/myriadcoin,TheBlueMatt/bitcoin,GlobalBoost/GlobalBoost,jmcorgan/bitcoin,sstone/bitcoin,h4x3rotab/BTCGPU,tecnovert/particl-core,practicalswift/bitcoin,BTCGPU/BTCGPU,ajtowns/bitcoin,namecoin/namecoin-core,bitcoinknots/bitcoin,jtimon/bitcoin,particl/particl-core,andreaskern/bitcoin,fanquake/bitcoin,pstratem/bitcoin,jamesob/bitcoin,midnightmagic/bitcoin,mruddy/bitcoin,alecalve/bitcoin,AkioNak/bitcoin,randy-waterhouse/bitcoin,tecnovert/particl-core,qtumproject/qtum,namecoin/namecore,qtumproject/qtum,Kogser/bitcoin,achow101/bitcoin,Kogser/bitcoin,gjhiggins/vcoincore,DigitalPandacoin/pandacoin,n1bor/bitcoin,tjps/bitcoin,fanquake/bitcoin,sstone/bitcoin,Sjors/bitcoin,h4x3rotab/BTCGPU,fanquake/bitcoin,fujicoin/fujicoin,RHavar/bitcoin,donaloconnor/bitcoin,guncoin/guncoin,RHavar/bitcoin,afk11/bitcoin,instagibbs/bitcoin,guncoin/guncoin,bitcoin/bitcoin,myriadcoin/myriadcoin,ElementsProject/elements,OmniLayer/omnicore,rnicoll/dogecoin,jonasschnelli/bitcoin,rnicoll/dogecoin,digibyte/digibyte,bitcoinknots/bitcoin,andreaskern/bitcoin,JeremyRubin/bitcoin,stamhe/bitcoin,dscotese/bitcoin,Kogser/bitcoin,Christewart/bitcoin,domob1812/bitcoin,bespike/litecoin,mitchellcash/bitcoin,kazcw/bitcoin,Kogser/bitcoin,bitcoinsSG/bitcoin,domob1812/namecore,domob1812/huntercore,RHavar/bitcoin,MarcoFalke/bitcoin,vertcoin/vertcoin,domob1812/bitcoin