Handle corrupt wallets gracefully.

Corrupt wallets used to cause a DB_RUNRECOVERY uncaught exception and a
crash. This commit does three things:

1) Runs a BDB verify early in the startup process, and if there is a
low-level problem with the database:
  + Moves the bad wallet.dat to wallet.timestamp.bak
  + Runs a 'salvage' operation to get key/value pairs, and
    writes them to a new wallet.dat
  + Continues with startup.

2) Much more tolerant of serialization errors. All errors in deserialization
are reported by tolerated EXCEPT for errors related to reading keypairs
or master key records-- those are reported and then shut down, so the user
can get help (or recover from a backup).

3) Adds a new -salvagewallet option, which:
 + Moves the wallet.dat to wallet.timestamp.bak
 + extracts ONLY keypairs and master keys into a new wallet.dat
 + soft-sets -rescan, to recreate transaction history

This was tested by randomly corrupting testnet wallets using a little
python script I wrote (https://gist.github.com/3812689)
Don't try to verify a non-existent wallet.dat
Merge pull request #1833 from jgarzik/mempool-query

Send 'mempool' P2P command at the start of each P2P session
Revert "Send 'mempool' P2P command at the start of each P2P session"

Fat-fingered on github, and merged this too early.

This reverts commit 22f9b069035c9ba0416a62714db167eea5ba762f.
Merge pull request #1834 from jgarzik/kickblocks

P2P: Do not request blocks from peers with fewer blocks than us
Merge pull request #1915 from Diapolo/Qt5_compat_leftover

change Q_WS_MAC -> Q_OS_MAC (Qt5 compatibility)
Merge branch 'crash_at_exit' of github.com:gavinandresen/bitcoin-git
Merge branch 'wallet_exceptions' of github.com:gavinandresen/bitcoin-git
Fix bad merge, pszDataDir duplication
Bump versions for 0.7.1 release
0.7.1 release notes
Merge pull request #1901 from laanwj/2012_10_remove_strlcpy

get rid of strlcpy.h
Merge pull request #1911 from Diapolo/fix_signed_unsigned

fix wrong (signed/unsigned) printf format specifier in bitcoinrpc.cpp
Merge pull request #1900 from Diapolo/optionsmodel_getters

move most explicit getters in optionsmodel to header
Merge pull request #1913 from sipa/noi2p

Remove I2P support from netbase
Merge pull request #1879 from sipa/fdatasync

Use fdatasync instead of fsync on supported platforms
Fix a use-after-free problem in initialization (#1920)

Don't store the result of c_str().

Luckily, this only affects logging, though it could crash or leak
sensitive data to the log in rare cases.
Merge pull request #1921 from laanwj/2012_10_init_useafterfree

Fix a use-after-free problem in initialization (#1920)
Bitcoin-Qt: update english translation master file
Bitcoin-Qt: intregrate current translations from Transifex