bitcoin/bitcoin — pull request #5411 by cozz (2014-12-03 00:22:31+00:00)
Title: [Wallet] Optimize getBalance()/listunspent

This pr is supposed to speed up listunspent/getbalance calls.

It introduces a vector vWallet, which contains pointers to wallet transactions.
Only transactions which potentially contain unspent outputs are added to the vector.

A transaction is only added to the vector if it has at least one output that is ours,
and the output is either unspent, or spent but the spending tx has less than 100 confirmations.