Squashed commit of the following, plus fixups
to carry through the development to current master:

commit 4790f3c823a33fae44b82ef7962372e38b1b0131
Author: Pieter Wuille <pieter.wuille@gmail.com>
Date:   Fri Jan 11 23:34:08 2013 +0100

    Add address-based index

    1) Maintain a salt to perturbate the address index (protection against
       collisions).
    2) Add support for address index entries in the block index, and
       maintain those if -addrindex is specified. It indexes the use of
       every >8-byte data push in output script or consumed script - or in
       case of no such push, the entire script.
    3) Add a searchrawtransactions RPC call, which can look up raw
       transactions by address.

commit fd867c7dbc1b5ad971dd308069257e7db5e11ac1
Author: Pieter Wuille <pieter.wuille@gmail.com>
Date:   Sat Jan 12 00:48:29 2013 +0100

    Encapsulate CLevelDB iterators cleanly