CreateNewBlock: Check that the produced CBlock is acceptable (except for proof-of-work and merkletree, since those need to be provided later)

This throws an exception from CreateNewBlock otherwise, which is not safe without #1245!
Merge branch 'checknewblock_0.6.0' into checknewblock

Conflicts:
	src/main.cpp
URI-handling code update: added safety checks and notifications
massive URI-handling / IPC server re-work
Make CNetAddr::GetHash() return an unsigned val.

This prevents an undefined operation in main.cpp, when shifting the hash value
left by 32 bits.
Shifting a signed int left into the sign bit is undefined in C++11.
Fine-grained UI updates

Gets rid of `MainFrameRepaint` in favor of specific update functions that tell the UI exactly what changed.

This improves the efficiency of various handlers. Also fixes problems with mined transactions not showing up until restart.

The following notifications were added:

- `NotifyBlocksChanged`: Block chain changed
- `NotifyKeyStoreStatusChanged`: Wallet status (encrypted, locked) changed.
- `NotifyAddressBookChanged`: Address book entry changed.
- `NotifyTransactionChanged`: Wallet transaction added, removed or updated.
- `NotifyNumConnectionsChanged`: Number of connections changed.
- `NotifyAlertChanged`: New, updated or cancelled alert. As this finally makes it possible for the UI to know when a new alert arrived, it can be shown as OS notification.

These notifications could also be useful for RPC clients. However, currently, they are ignored in bitcoind (in noui.cpp).

Also brings back polling with timer for numBlocks in ClientModel. This value updates so frequently during initial download that the number of signals clogs the UI thread and causes heavy CPU usage. And after initial block download, the value changes so rarely that a delay of half a second until the UI updates is unnoticable.
Convert UI interface to boost::signals2.

- Signals now go directly from the core to WalletModel/ClientModel.
  - WalletModel subscribes to signals on CWallet: Prepares for multi-wallet support, by no longer assuming an implicit global wallet.
- Gets rid of noui.cpp, the few lines that were left are merged into init.cpp
- Rename wxXXX message flags to MF_XXX, to make them UI indifferent.
- ThreadSafeMessageBox no longer returns the value `4` which was never used, converted to void.
Process address book updates incrementally

- No longer invalidates selection model, thus retains selection on address book changes
- Fixes selection of new address when added
Base32 encoding/decoding
Unit tests for base32 encode/decode
Node support for Tor hidden services

This commit adds support for .onion addresses (mapped into the IPv6
by using OnionCat's range and encoding), and the ability to connect
to them via a SOCKS5 proxy.
Rewrite CNetAddr::GetReachabilityFrom()

Add support for Tor/I2P networks, and make code more readable.
Automatically consider Tor addresses reachable
Some documentation about tor
Debug version messages
Don't overflow signed ints in CBigNum::setint64().

CBigNum::setint64() does 'n <<= 8', where n is of type "long long".

This leads to shifting onto and past the sign bit, which is undefined
behavior in C++11 and can cause problems in the future.
Add test case for CBigNum::setint64().

One of the test cases currently aborts when using gcc's flag -ftrapv, due to
negating an INT64_MIN int64 variable, which is an undefined operation.

This will be fixed in a subsequent commit.
Fix signed subtraction overflow in CBigNum::setint64().

As noticed by sipa (Pieter Wuille), this can happen when CBigNum::setint64() is
called with an integer value of INT64_MIN (-2^63).

When compiled with -ftrapv, the program would crash. Otherwise, it would
execute an undefined operation (although in practice, usually the correct one).
Add -proxytoo option, which allows proxy use non-exclusively, unlike the -proxy option.

Conflicts:

	src/init.cpp
	src/netbase.cpp
Filter out whitespace and zero-width non-breaking spaces in validator

- Fixes issues with copy/pasting from web or html emails (#1325)