CAddrMan: stochastic address manager

Design goals:
 * Only keep a limited number of addresses around, so that addr.dat does not grow without bound.
 * Keep the address tables in-memory, and occasionally write the table to addr.dat.
 * Make sure no (localized) attacker can fill the entire table with his nodes/addresses.

See comments in addrman.h for more detailed information.
Limit getheaders to a hard 2000.

Previously getheaders would return any number of headers up to
2000 + the distance the locator parameter was back (which is up to
~ the number of items in the locator ^ 2).

The only client I was able to find which actually handles the headers
message is BitcoinJ, and it clearly expects no more than 2000 headers
See:
http://code.google.com/p/bitcoinj/source/browse/core/src/main/java/com/google/bitcoin/core/HeadersMessage.java#35

Additionally, the wiki clearly states that getheaders will only ever
return 2000 headers: https://en.bitcoin.it/wiki/Network#Messages
Speed up block downloading
replace call to PrintConsole with call to error()

As these are equivalent functions, this cleans up the source a bit.
Also remove PrintConsole() as this was the only use.
Remove -bip16 and -paytoscripthashtime command-line arguments
Fix warning about deprecated unescaped backslash
Add -checklevel and improve -checkblocks

-checkblocks now takes a numeric argument: the number of blocks that must
be verified at the end of the chain. Default is 2500, and 0 means all
blocks.

-checklevel specifies how thorough the verification must be:
0: only check whether the block exists on disk
1: verify block validity (default)
2: verify transaction index validity
3: check transaction hashes
4: check whether spent txouts were spent within the main chain
5: check whether all prevouts are marked spent
6: check whether spent txouts were spent by a valid transaction that consumes them
Check minversion before loading the rest of the wallet

When a 0.6 wallet with compressed pubkeys is created, it writes a
minversion record to prevent older clients from reading it. If the 0.5
loading it sees a key record before seeing the minversion record however,
it will fail with DB_CORRUPT instead of DB_TOO_NEW.
Merge pull request #969 from laanwj/2012_03_printconsole_error

replace call to PrintConsole with call to error()
Merge branch 'master' of github.com:bitcoin/bitcoin
Merge pull request #964 from sipa/fastblocks

Speed up block downloading
Merge branch 'addrman' of https://github.com/sipa/bitcoin
Merge pull request #975 from sipa/versioncheck

Check minversion before loading the rest of the wallet
Merge branch 'checklevel' of https://github.com/sipa/bitcoin
Move QMAKE_LIBS_QT_ENTRY adjustment to bitcoin side of build

It could just as well be on either part of the gitian build, but to safely put it on the Qt side would require bumping the filename, and every gitian user rebuilding it.
v0.5.3.1 put it on the Bitcoin side, and this is easier to work with and keep safe, so I'm moving it.

Use `qmake MINGW_THREAD_BUGFIX=0` to disable
Merge pull request #946 from luke-jr/bugfix_rm_mingw

Move QMAKE_LIBS_QT_ENTRY adjustment to bitcoin side of build
Introduce explicit -walletupgrade option

Do not automatically change the wallet format unless the user takes an
explicit action that implies an upgrade (encrypting, for now), or uses
-walletupgrade.

-walletupgrade optionally takes an integer argument: the client version
up to which upgrading is allowed. Without an argument, it is upgraded
to latest supported version. If an argument to -walletupgrade is
provided at the time the wallet is created, the new wallet will initially
not use features beyond that version.

Third, the current wallet version number is reported in getinfo.
Add Luke-Jr's PGP key to gitian-downloader
remove unused functions from util.h/util.cpp
Give DNS seeds a random age between 3 and 7 days old

This speeds up initial connections with an old/large addr.dat a lot.