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>

Czarcoin/czarcoin,Litecoindark/LTCD,koharjidan/litecoin,brishtiteveja/sherlockholmescoin,coinkeeper/2015-04-19_21-20_litecoindark,greencoin-dev/greencoin-dev,IlfirinCano/shavercoin,Electronic-Gulden-Foundation/egulden,Electronic-Gulden-Foundation/egulden,koharjidan/litecoin,Czarcoin/czarcoin,oklink-dev/litecoin_block,IlfirinCano/shavercoin,greencoin-dev/greencoin-dev,Tetcoin/tetcoin,Rav3nPL/doubloons-08,brishtiteveja/sherlockholmescoin,coinkeeper/2015-04-19_21-20_litecoindark,oklink-dev/litecoin_block,Electronic-Gulden-Foundation/egulden,ccoin-project/ccoin,Litecoindark/LTCD,Ziftr/litecoin,stamhe/litecoin,greencoin-dev/greencoin-dev,Electronic-Gulden-Foundation/egulden,coinkeeper/2015-04-19_21-20_litecoindark,oklink-dev/litecoin_block,Ziftr/litecoin,wekuiz/wekoin,ccoin-project/ccoin,ccoin-project/ccoin,IlfirinCano/shavercoin,IlfirinCano/shavercoin,wekuiz/wekoin,stamhe/litecoin,Czarcoin/czarcoin,stamhe/litecoin,IlfirinIlfirin/shavercoin,mooncoin-project/mooncoin-landann,mooncoin-project/mooncoin-landann,greencoin-dev/greencoin-dev,Litecoindark/LTCD,brishtiteveja/sherlockholmescoin,Tetcoin/tetcoin,Tetcoin/tetcoin,IlfirinIlfirin/shavercoin,koharjidan/litecoin,koharjidan/litecoin,IlfirinIlfirin/shavercoin,Czarcoin/czarcoin,IlfirinIlfirin/shavercoin,Rav3nPL/doubloons-08,okinc/litecoin,greencoin-dev/greencoin-dev,oklink-dev/litecoin_block,koharjidan/litecoin,Rav3nPL/doubloons-08,mooncoin-project/mooncoin-landann,okinc/litecoin,brishtiteveja/sherlockholmescoin,brishtiteveja/sherlockholmescoin,stamhe/litecoin,Ziftr/litecoin,mooncoin-project/mooncoin-landann,Rav3nPL/doubloons-08,koharjidan/litecoin,mooncoin-project/mooncoin-landann,wekuiz/wekoin,IlfirinIlfirin/shavercoin,coinkeeper/2015-04-19_21-20_litecoindark,IlfirinCano/shavercoin,okinc/litecoin,okinc/litecoin,Tetcoin/tetcoin,Ziftr/litecoin,Ziftr/litecoin,Electronic-Gulden-Foundation/egulden,okinc/litecoin,wekuiz/wekoin,ccoin-project/ccoin,Czarcoin/czarcoin,oklink-dev/litecoin_block,coinkeeper/2015-04-19_21-20_litecoindark,Litecoindark/LTCD,Tetcoin/tetcoin,Electronic-Gulden-Foundation/egulden,Litecoindark/LTCD,Rav3nPL/doubloons-08,wekuiz/wekoin