Avoid repeated lookups in mapOrphanTransactions and mapOrphanTransactionsByPrev
Avoid repeated lookups in mapOrphanTransactions and mapOrphanTransactionsByPrev

Rebased-From: 89d91f6
Rebased-By: Wladimir J. van der Laan <bbc07dc96bb50bf6868a2ddfc4dae14fbed703d9@gmail.com>

benzmuircroft/REWIRE.io,ediston/energi,Anoncoin/anoncoin,midnight-miner/LasVegasCoin,ColossusCoinXT/ColossusCoinXT,rdqw/sscoin,reddcoin-project/reddcoin,Petr-Economissa/gvidon,CoinProjects/AmsterdamCoin-v4,grumpydevelop/singularity,keesdewit82/LasVegasCoin,coinkeeper/2015-06-22_19-00_ziftrcoin,greencoin-dev/digitalcoin,world-bank/unpay-core,UdjinM6/dash,presstab/PIVX,Vsync-project/Vsync,CoinProjects/AmsterdamCoin-v4,BlockchainTechLLC/3dcoin,diggcoin/diggcoin,dev1972/Satellitecoin,rdqw/sscoin,keesdewit82/LasVegasCoin,PIVX-Project/PIVX,ticclassic/ic,reddink/reddcoin,grumpydevelop/singularity,PIVX-Project/PIVX,Mrs-X/PIVX,mycointest/owncoin,coinkeeper/2015-06-22_19-00_ziftrcoin,DGCDev/digitalcoin,axelxod/braincoin,nmarley/dash,skaht/bitcoin,reddink/reddcoin,ticclassic/ic,dmrtsvetkov/flowercoin,UdjinM6/dash,Mrs-X/Darknet,nmarley/dash,skaht/bitcoin,Anoncoin/anoncoin,diggcoin/diggcoin,antcheck/antcoin,RyanLucchese/energi,Anoncoin/anoncoin,DMDcoin/Diamond,benzmuircroft/REWIRE.io,nmarley/dash,coinerd/krugercoin,UdjinM6/dash,npccoin/npccoin,lakepay/lake,ColossusCoinXT/ColossusCoinXT,Mrs-X/PIVX,HeliumGas/helium,crowning2/dash,Mrs-X/PIVX,PIVX-Project/PIVX,willwray/dash,pinkevich/dash,cerebrus29301/crowncoin,knolza/gamblr,rsdevgun16e/energi,terracoin/terracoin,grumpydevelop/singularity,ArgonToken/ArgonToken,dev1972/Satellitecoin,puticcoin/putic,puticcoin/putic,slingcoin/sling-market,rdqw/sscoin,coinkeeper/2015-06-22_19-07_digitalcoin,knolza/gamblr,slingcoin/sling-market,ArgonToken/ArgonToken,joroob/reddcoin,worldbit/worldbit,xuyangcn/opalcoin,presstab/PIVX,lakepay/lake,putinclassic/putic,coinkeeper/2015-06-22_18-36_darkcoin,bickojima/bitzeny,Mrs-X/Darknet,mastercoin-MSC/mastercore,Earlz/renamedcoin,terracoin/terracoin,coinkeeper/2015-06-22_19-00_ziftrcoin,willwray/dash,DGCDev/argentum,biblepay/biblepay,ivansib/sib16,thelazier/dash,ediston/energi,ticclassic/ic,dmrtsvetkov/flowercoin,alejandromgk/Lunar,lakepay/lake,putinclassic/putic,reddcoin-project/reddcoin,nightlydash/darkcoin,Bloom-Project/Bloom,world-bank/unpay-core,greencoin-dev/digitalcoin,LIMXTEC/DMDv3,thelazier/dash,cerebrus29301/crowncoin,thelazier/dash,worldbit/worldbit,crowning-/dash,world-bank/unpay-core,reddink/reddcoin,GroundRod/anoncoin,BlockchainTechLLC/3dcoin,worldbit/worldbit,CoinProjects/AmsterdamCoin-v4,willwray/dash,xuyangcn/opalcoin,coinerd/krugercoin,LIMXTEC/DMDv3,PandaPayProject/PandaPay,PIVX-Project/PIVX,Vsync-project/Vsync,worldbit/worldbit,joroob/reddcoin,rdqw/sscoin,Mrs-X/Darknet,willwray/dash,biblepay/biblepay,crowning-/dash,ivansib/sibcoin,biblepay/biblepay,Earlz/renamedcoin,ionomy/ion,projectinterzone/ITZ,jmgilbert2/energi,Bloom-Project/Bloom,presstab/PIVX,zenywallet/bitzeny,crowning-/dash,puticcoin/putic,mobicoins/mobicoin-core,mastercoin-MSC/mastercore,ivansib/sib16,freelion93/mtucicoin,bickojima/bitzeny,diggcoin/diggcoin,dexX7/mastercore,DGCDev/digitalcoin,ticclassic/ic,litecoin-project/bitcoinomg,diggcoin/diggcoin,schinzelh/dash,ahmedbodi/test2,ivansib/sib16,knolza/gamblr,thelazier/dash,DMDcoin/Diamond,ColossusCoinXT/ColossusCoinXT,bmp02050/ReddcoinUpdates,zenywallet/bitzeny,aspirecoin/aspire,bmp02050/ReddcoinUpdates,ZiftrCOIN/ziftrcoin,Anoncoin/anoncoin,RyanLucchese/energi,greencoin-dev/digitalcoin,ZiftrCOIN/ziftrcoin,RyanLucchese/energi,ionomy/ion,mycointest/owncoin,Bloom-Project/Bloom,biblepay/biblepay,inkvisit/sarmacoins,zenywallet/bitzeny,projectinterzone/ITZ,diggcoin/diggcoin,joroob/reddcoin,coinerd/krugercoin,jmgilbert2/energi,blood2/bloodcoin-0.9,LIMXTEC/DMDv3,alejandromgk/Lunar,skaht/bitcoin,knolza/gamblr,UdjinM6/dash,freelion93/mtucicoin,freelion93/mtucicoin,aspirecoin/aspire,xuyangcn/opalcoin,pinkevich/dash,mycointest/owncoin,ArgonToken/ArgonToken,dexX7/mastercore,dexX7/mastercore,Petr-Economissa/gvidon,mycointest/owncoin,DGCDev/argentum,BlockchainTechLLC/3dcoin,putinclassic/putic,freelion93/mtucicoin,Darknet-Crypto/Darknet,nightlydash/darkcoin,rsdevgun16e/energi,litecoin-project/bitcoinomg,ionomy/ion,Darknet-Crypto/Darknet,basicincome/unpcoin-core,basicincome/unpcoin-core,pelorusjack/BlockDX,schinzelh/dash,aspirecoin/aspire,dmrtsvetkov/flowercoin,Mrs-X/Darknet,terracoin/terracoin,mastercoin-MSC/mastercore,ArgonToken/ArgonToken,pinkevich/dash,Vsync-project/Vsync,PandaPayProject/PandaPay,pinkevich/dash,CoinProjects/AmsterdamCoin-v4,reddcoin-project/reddcoin,48thct2jtnf/P,basicincome/unpcoin-core,inkvisit/sarmacoins,ZiftrCOIN/ziftrcoin,dashpay/dash,blood2/bloodcoin-0.9,jmgilbert2/energi,pelorusjack/BlockDX,DMDcoin/Diamond,Mrs-X/PIVX,greencoin-dev/digitalcoin,benzmuircroft/REWIRE.io,nmarley/dash,zenywallet/bitzeny,Mrs-X/Darknet,ahmedbodi/test2,ivansib/sibcoin,coinkeeper/2015-06-22_18-36_darkcoin,48thct2jtnf/P,aspirecoin/aspire,coinkeeper/2015-06-22_19-07_digitalcoin,greencoin-dev/digitalcoin,pelorusjack/BlockDX,ediston/energi,ticclassic/ic,nightlydash/darkcoin,axelxod/braincoin,putinclassic/putic,aspirecoin/aspire,axelxod/braincoin,ivansib/sibcoin,nmarley/dash,schinzelh/dash,kbccoin/kbc,dmrtsvetkov/flowercoin,reddcoin-project/reddcoin,dev1972/Satellitecoin,bickojima/bitzeny,antcheck/antcoin,presstab/PIVX,puticcoin/putic,cerebrus29301/crowncoin,keesdewit82/LasVegasCoin,diggcoin/diggcoin,BlockchainTechLLC/3dcoin,DGCDev/argentum,keesdewit82/LasVegasCoin,presstab/PIVX,presstab/PIVX,Vsync-project/Vsync,DGCDev/digitalcoin,slingcoin/sling-market,jmgilbert2/energi,zenywallet/bitzeny,PIVX-Project/PIVX,Vsync-project/Vsync,inkvisit/sarmacoins,Bloom-Project/Bloom,rdqw/sscoin,DMDcoin/Diamond,schinzelh/dash,npccoin/npccoin,rsdevgun16e/energi,axelxod/braincoin,cerebrus29301/crowncoin,blood2/bloodcoin-0.9,thelazier/dash,coinkeeper/2015-06-22_19-00_ziftrcoin,HeliumGas/helium,LIMXTEC/DMDv3,bmp02050/ReddcoinUpdates,alejandromgk/Lunar,HeliumGas/helium,DGCDev/digitalcoin,inkvisit/sarmacoins,willwray/dash,crowning-/dash,antcheck/antcoin,basicincome/unpcoin-core,crowning2/dash,crowning-/dash,willwray/dash,coinkeeper/2015-06-22_19-00_ziftrcoin,grumpydevelop/singularity,HeliumGas/helium,UdjinM6/dash,cryptodev35/icash,xuyangcn/opalcoin,dashpay/dash,crowning2/dash,mycointest/owncoin,ionomy/ion,PIVX-Project/PIVX,LIMXTEC/DMDv3,ArgonToken/ArgonToken,biblepay/biblepay,jmgilbert2/energi,kbccoin/kbc,mastercoin-MSC/mastercore,dev1972/Satellitecoin,Petr-Economissa/gvidon,worldbit/worldbit,lakepay/lake,pinkevich/dash,blood2/bloodcoin-0.9,DMDcoin/Diamond,ColossusCoinXT/ColossusCoinXT,dashpay/dash,Bloom-Project/Bloom,Petr-Economissa/gvidon,DMDcoin/Diamond,jmgilbert2/energi,rsdevgun16e/energi,ahmedbodi/test2,pelorusjack/BlockDX,puticcoin/putic,cryptodev35/icash,ionomy/ion,benzmuircroft/REWIRE.io,freelion93/mtucicoin,midnight-miner/LasVegasCoin,mastercoin-MSC/mastercore,npccoin/npccoin,npccoin/npccoin,kbccoin/kbc,nmarley/dash,Mrs-X/PIVX,coinkeeper/2015-06-22_18-36_darkcoin,slingcoin/sling-market,terracoin/terracoin,Earlz/renamedcoin,PandaPayProject/PandaPay,worldbit/worldbit,joroob/reddcoin,inkvisit/sarmacoins,GroundRod/anoncoin,dexX7/mastercore,puticcoin/putic,Mrs-X/PIVX,coinkeeper/2015-06-22_19-07_digitalcoin,reddink/reddcoin,grumpydevelop/singularity,putinclassic/putic,crowning-/dash,cerebrus29301/crowncoin,pelorusjack/BlockDX,Darknet-Crypto/Darknet,mycointest/owncoin,ediston/energi,world-bank/unpay-core,dashpay/dash,coinkeeper/2015-06-22_18-36_darkcoin,ivansib/sibcoin,skaht/bitcoin,biblepay/biblepay,dev1972/Satellitecoin,DGCDev/argentum,GroundRod/anoncoin,bmp02050/ReddcoinUpdates,slingcoin/sling-market,ediston/energi,litecoin-project/bitcoinomg,ivansib/sibcoin,dmrtsvetkov/flowercoin,nightlydash/darkcoin,inkvisit/sarmacoins,keesdewit82/LasVegasCoin,DGCDev/digitalcoin,mobicoins/mobicoin-core,knolza/gamblr,dashpay/dash,benzmuircroft/REWIRE.io,Bloom-Project/Bloom,Petr-Economissa/gvidon,reddink/reddcoin,world-bank/unpay-core,axelxod/braincoin,skaht/bitcoin,ColossusCoinXT/ColossusCoinXT,CoinProjects/AmsterdamCoin-v4,projectinterzone/ITZ,joroob/reddcoin,antcheck/antcoin,biblepay/biblepay,48thct2jtnf/P,coinkeeper/2015-06-22_19-07_digitalcoin,Earlz/renamedcoin,nightlydash/darkcoin,RyanLucchese/energi,PIVX-Project/PIVX,cryptodev35/icash,rsdevgun16e/energi,PandaPayProject/PandaPay,terracoin/terracoin,lakepay/lake,HeliumGas/helium,alejandromgk/Lunar,cerebrus29301/crowncoin,ivansib/sib16,Vsync-project/Vsync,Petr-Economissa/gvidon,RyanLucchese/energi,48thct2jtnf/P,rdqw/sscoin,basicincome/unpcoin-core,ticclassic/ic,blood2/bloodcoin-0.9,xuyangcn/opalcoin,Mrs-X/Darknet,Earlz/renamedcoin,dev1972/Satellitecoin,reddcoin-project/reddcoin,rsdevgun16e/energi,knolza/gamblr,ahmedbodi/test2,reddcoin-project/reddcoin,coinerd/krugercoin,midnight-miner/LasVegasCoin,RyanLucchese/energi,alejandromgk/Lunar,litecoin-project/bitcoinomg,coinkeeper/2015-06-22_18-36_darkcoin,midnight-miner/LasVegasCoin,midnight-miner/LasVegasCoin,cryptodev35/icash,PIVX-Project/PIVX,kbccoin/kbc,schinzelh/dash,ivansib/sibcoin,midnight-miner/LasVegasCoin,Anoncoin/anoncoin,ahmedbodi/test2,antcheck/antcoin,crowning2/dash,terracoin/terracoin,mobicoins/mobicoin-core,48thct2jtnf/P,ColossusCoinXT/ColossusCoinXT,slingcoin/sling-market,ArgonToken/ArgonToken,BlockchainTechLLC/3dcoin,dmrtsvetkov/flowercoin,GroundRod/anoncoin,Darknet-Crypto/Darknet,ivansib/sib16,BlockchainTechLLC/3dcoin,biblepay/biblepay,48thct2jtnf/P,alejandromgk/Lunar,benzmuircroft/REWIRE.io,coinkeeper/2015-06-22_19-07_digitalcoin,schinzelh/dash,putinclassic/putic,ivansib/sib16,projectinterzone/ITZ,bickojima/bitzeny,axelxod/braincoin,PandaPayProject/PandaPay,CoinProjects/AmsterdamCoin-v4,GroundRod/anoncoin,pelorusjack/BlockDX,npccoin/npccoin,bmp02050/ReddcoinUpdates,ediston/energi,cryptodev35/icash,xuyangcn/opalcoin,ZiftrCOIN/ziftrcoin,ionomy/ion,nmarley/dash,PandaPayProject/PandaPay,DGCDev/argentum,grumpydevelop/singularity,crowning2/dash,npccoin/npccoin,Darknet-Crypto/Darknet,freelion93/mtucicoin,projectinterzone/ITZ,kbccoin/kbc,ZiftrCOIN/ziftrcoin,aspirecoin/aspire,mobicoins/mobicoin-core,LIMXTEC/DMDv3,PIVX-Project/PIVX,mobicoins/mobicoin-core,Darknet-Crypto/Darknet,antcheck/antcoin,keesdewit82/LasVegasCoin,bickojima/bitzeny,pinkevich/dash,HeliumGas/helium,lakepay/lake,ahmedbodi/test2