remove duplicate bitdb.Open() code from init

- remove code from step 7, which we already have in step 5 of init
Try moving database/ away in case of failure
Remove database/ after clean shutdown
Allow the default key to be unavailable

This solves the issue where no default key can be added after -salvagewallet.
Improve gettxoutsetinfo command

* Bugfix: output the correct best block hash (during IBD, it can
  differ from the actual current best block)
* Add height to output
* Add hash_serialized, which is a hash of the entire UTXO state.
  Can be useful to compare two nodes.
* Add total_amount, the sum of all UTXOs' values.
Bugfix: if no bestblock record is present, do a -rescan

It is possible to have a wallet.dat file without any bestblock
record at all (if created offline, for example), which - when
loaded into a client with a up-to-date chain - does no rescan and
shows no transactions.

Also make sure to write the current best block after a rescan, so
it isn't necessary twice.
Do not kill connections on recv buffer overflow

Instead of killing a connection when the receive buffer overflows,
just temporarily halt receiving before that happens. Also, no
matter what, always allow at least one full message in the receive
buffer (otherwise blocks larger than the configured buffer size
would pause indefinitely).
Do not write to wallet during LoadWallet

When debugging another issue, I found a hang-during-startup race condition due to
LoadWallet calling SetMinVersion (via LoadCryptedKey).

Writing to the file that you're in the process of reading is a bad idea.
Remove implementation of disabled opcodes

So we stop getting pull requests (like #2604) fixing problems with disabled Script opcodes.
A hard fork would be required to re-enable these, and if we ever did that we'd require extensive review and testing.
osx: show testnet icon in dock as early as possible

A green testnet splashscreen with a normal, orange dock icon looks strange and can confuse users.

Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
Merge pull request #2602 from sipa/utxostate

Improve gettxoutsetinfo command
Merge pull request #2603 from sipa/nobestblock

Bugfix: if no bestblock record is present, do a -rescan
Merge pull request #2607 from gavinandresen/loadwalletfix

Do not write to wallet during LoadWallet
Merge pull request #2566 from sipa/nodef

Allow the default key to be unavailable
Merge pull request #2610 from gavinandresen/scriptcleanup

Remove implementation of disabled opcodes
Merge pull request #2614 from jonasschnelli/icon_testnet_mac

osx: show testnet icon in dock as early as possible
Merge pull request #2599 from sipa/norecvdisc

Do not kill connections on recv buffer overflow
Merge pull request #2558 from sipa/nodbdir

Some database/-related recovery improvements