Support multi-threaded JSON-RPC

Change internal HTTP JSON-RPC server from single-threaded to
thread-per-connection model.  The IP filter list is applied prior to starting
the thread, which then processes the RPC.

A mutex covers the entire RPC operation, because not all RPC operations are
thread-safe.

[minor modifications by jgarzik, to make change upstream-ready]
RPC: Support HTTP/1.0 and HTTP/1.1, including the proper use of keep-alives
CTxMemPool: consolidate two frequently-printed debug.log lines into one

Previously, a single TX would trigger two log lines in quick succession,

        addUnchecked(): size 152
        CTxMemPool::accept() : accepted c4cfdd48b7

After this change, only one log line is used:

        CTxMemPool::accept() : accepted 98885e65db (poolsz 26)
CTxMemPool::accept(): do not log FetchInputs failure redundantly

FetchInputs already logs failures internally.  This commit makes the logging
more consistent with other FetchInputs callsites also.

Prior to this commit, two log lines were logged for one condition:

     ERROR: FetchInputs() : de15fde415 mempool Tx prev not found a2c75da227
     ERROR: CTxMemPool::accept() : FetchInputs failed de15fde415

After this commit, only one line is logged:

     ERROR: FetchInputs() : e0507ab2c7 mempool Tx prev not found 9a620262cd
Fix version numbers of archive builds
if there is no current block number available display N/A on totalBlocks label, instead of 0, which can not ever be true
IPv6 node support

This will make bitcoin relay valid routable IPv6 addresses, and when
USE_IPV6 is enabled, listen on IPv6 interfaces and attempt connections
to IPv6 addresses.
Preliminary support for Tor/I2P hidden services

There are plans to let Bitcoin function as Tor/I2P hidden service.
To do so, we could use the established encoding provided by OnionCat
and GarliCat (without actually using those tools) to embed Tor/I2P
addresses in IPv6.

This patch makes these addresses considered routable, so they can
travel over the Bitcoin network in 'addr' messages. This will hopefully
make it easier to deploy real hidden service support later.
Limited relaying/storing of foreign addresses

Introduce a boolean variable for each "network" (ipv4, ipv6, tor, i2p),
and track whether we are likely to able to connect to it. Addresses in
"addr" messages outside of our network get limited relaying and are not
stored in addrman.
Add -noproxy to circumvent proxy for some network
Use NET_ identifiers in CNetAddr::GetGroup()
Add -blocknet to prevent connections to a given network
Keep port information for local addresses
Separate listening sockets, -bind=<addr>
add calls to qApp->setWindowIcon(), to remove the need to set window icons for testnet with additional calls
Merge pull request #1259 from Diapolo/GUI_testnet_UX

GUI: allow easier use of the testnet icon
Merge pull request #1258 from Diapolo/RPCCon_never_0_Blocks

GUI RPC Console: if there is no current block number available display N/A on totalBlocks label,...
Merge pull request #1254 from jgarzik/mempool-logging

CTxMemPool: consolidate two frequently-printed debug.log lines into one
Use semaphores instead of condition variables
Use polling instead of boost's broken semaphore on OSX