Adds new rpc call “gettxoutsbyaddress” as requested in #4007. Disabled by default, enabled with -txoutsbyaddressindex.
The index is built from the normal utxo on first use, reindex is not required. For the GUI there is progress shown, on bitcoind you just need to be patient.
The qa-test includes a simple reorganization. I tested all 4 code parts in main.cpp by commenting them out and check if the qa-test fails at the expected line. I had to modify the rpc call for this test, as normally wrong outputs in the address index are not exposed to the user, because the rpc call relies on the normal GetCoins call. The rest of the code has been tested in random ad-hoc testing. I only tested linux on my machine.
Its all in 1 commit for laziness reasons, but if splitting in multiple commits would help reviewing, I could do that.