Ignore too-long redeemScripts while loading wallet

This avoids that long redeemScripts that were grandfathered in
prevent the wallet from loading.

Fixes #4313.
Merge pull request #4316

18116b0 Ignore too-long redeemScripts while loading wallet (Wladimir J. van der Laan)
bitcoin-cli, rpcclient: prefer EXIT_FAILURE cstdlib constant

A more complex construction via abs() yields the same end result.

Rebased-From: 34ff109
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Remove cli functionality from bitcoind

As it says on the tin. It was deprecated in version 0.9, and
at some point it should be removed.

Removes the dependency of bitcoind on libbitcoin-cli.a. Move
some functions that used to be shared but are now only used in
bitcoin-cli.cpp to that file.

After this change, an error is printed (and exit code 1 is returned)
when the user tries to send RPC commands using bitcoind.
Merge pull request #4232

b750cf1 Remove cli functionality from bitcoind (Wladimir J. van der Laan)
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
Fix file descriptor leak

Originally reported by dexX7