Enable paranoid corruption checks in LevelDB >= 1.16
Update Debian packaging description for new bitcoin-cli
Improved logging and Decimal support
init.cpp: log fee estimates filename on error

- small changes to Shutdown(), buffer __func__, which is now used in
  all LogPrintf() calls and format for better readability
- order using namespace alpabetically
add GetRandBytes() as wrapper for RAND_bytes()

- add a small wrapper in util around RAND_bytes() and replace with
  GetRandBytes() in the code to log errors from calling RAND_bytes()
- remove OpenSSL header rand.h where no longer needed
move rand functions from util to new random.h/.cpp
make RandAddSeed() use OPENSSL_cleanse()

- removes the cstring include and is also used in RandAddSeedPerfmon()
Merge pull request #4489 from gavinandresen/python_bitcoinrpc_update

Improved bitcoinrpc logging and Decimal support
Refactor common RPC test code to BitcoinTestFramework base class

Inspired by #3956, with a little more flexibility built in.

I didn't touch rpcbind_test.py, because it only runs on Linux.
Print better errors, and add util stop_node() function.
Merge pull request #4486

45abeb2 Update Debian packaging description for new bitcoin-cli (Johnathan Corgan)
Merge pull request #4428

00d1980 init.cpp: log fee estimates filename on error (Philip Kaufmann)
Merge pull request #4485 from gavinandresen/refactor_python_tests

Refactor common RPC test code to BitcoinTestFramework base class
Introduce whitelisted peers.

This adds a -whitelist option to specify subnet ranges from which peers
that connect are whitelisted. In addition, there is a -whitebind option
which works like -bind, except peers connecting to it are also
whitelisted (allowing a separate listen port for trusted connections).

Being whitelisted has two effects (for now):
* They are immune to DoS disconnection/banning.
* Transactions they broadcast (which are valid) are always relayed,
  even if they were already in the mempool. This means that a node
  can function as a gateway for a local network, and that rebroadcasts
  from the local network will work as expected.

Whitelisting replaces the magic exemption localhost had for DoS
disconnection (local addresses are still never banned, though), which
implied hidden service connects (from a localhost Tor node) were
incorrectly immune to DoS disconnection as well. This old
behaviour is removed for that reason, but can be restored using
-whitelist=127.0.0.1 or -whitelist=::1 can be specified. -whitebind
is safer to use in case non-trusted localhost connections are expected
(like hidden services).
Fix Error: No file at @loader_path/libboost_system-mt.dylib
Avoid a segfault on getblock if it can't read a block from disk.
Merge pull request #4190

502972f Fix Error: No file at @loader_path/libboost_system-mt.dylib (Federico Bond)
Clean up RPCs that are disabled in safe-mode.

This removes some inconsistencies in what worked and didn't work in
 safemode. Now only RPCs involved in getting balances or sending
 funds are disabled.

Previously you could mine but not submit blocks— but we may need more
 blocks to resolve a fork that triggered safe mode in the first place,
 and the non-submission was not reliable since some miners submit
 blocks via multiple means. There were also a number of random commands
 disabled that had nothing to do with the blockchain like verifymessage.

Thanks to earlz for pointing out that there were some moderately cheap
 ways to maliciously trigger safe mode, which brought attention to
 the fact that safemode wasn't used in a very intelligent way.
Merge pull request #4501

954d2e7 Avoid a segfault on getblock if it can't read a block from disk. (Ruben Dario Ponticelli)
getblocktemplate: longpolling support