permit one data txout per non-data txout
ui_interface: remove unused NotifyBlocksChanged signal

Conflicts:
	src/main.cpp
	src/qt/clientmodel.cpp
rpc: Compute number of confirmations of a block from block height

Currently this uses a CMerkleTx, but that makes no sense as we
have the CBlockIndex available. As noted by @jgarzik.

Conflicts:
	src/rpcblockchain.cpp
remove useless millisleep

reduces time to service requests improving performance
net: Remove MilliSleep from StopNode

I don't understand why it would be there in the first place. This looks
like voodoo, not programming.

Conflicts:
	src/net.cpp
Shutdown cleanup prep-work

Create a boost::thread_group object at the qt/bitcoind main-loop level
that will hold pointers to all the main-loop threads.

This will replace the vnThreadsRunning[] array.

For testing, ported the BitcoinMiner threads to use its
own boost::thread_group.

Conflicts:
	src/main.cpp
LoopForever and ThreadTrace helpers
Use a copy in place of mapMultiArgs["-addnode"].

Also moves the DNS lookup of -addnode nodes into the repeated
loop, allowing -addnode to follow DNS changes.

Conflicts:
	src/net.cpp
Make ThreadOpenAddedConnections2 exit quicker if(GetNameProxy()).

Conflicts:
	src/net.cpp
Try more than the first address for a DNS -addnode.

Conflicts:
	src/net.cpp
Add addnode RPC command.

Conflicts:
	src/bitcoinrpc.cpp
	src/bitcoinrpc.h
	src/rpcnet.cpp
Add a getaddednodeinfo RPC.

Conflicts:
	src/bitcoinrpc.cpp
	src/bitcoinrpc.h
	src/rpcnet.cpp
RPC, cosmetic: push down ReadHTTPStatus() calls into ReadHTTP() callers

ReadHTTPStatus() is currently overloaded:  In client mode, it properly parses
and receives an HTTP status line.  In server mode, it incorrectly parses the
HTTP request line as an HTTP status line.

This server mode bug has never mattered, because the RPC server never
cared about the URI (path) provided in the HTTP request.  That will change in
the future, so go ahead and begin fixing the problem.

This patch is cosmetic, and should result in NO behavior changes.

Further renames:
ReadHTTPHeader -> ReadHTTPHeaders
ReadHTTP -> ReadHTTPMessage
RPC: HTTP server uses its own ReadHTTPRequestLine()
rather than reusing ReadHTTPStatus() from the client mode.

The following additional HTTP request validations are added, both in line with
existing HTTP client practice:

1) HTTP method must be GET or POST.  Most clients use POST, some
   use GET.  Either way, this continues to work.
2) HTTP URI must start with "/" character.
   Normal URI is "/" (a 1-char string), so this is fine.
Port Thread* methods to boost::thread_group

Conflicts:
	src/bitcoinrpc.cpp
	src/checkqueue.h
	src/init.cpp
	src/main.cpp
	src/main.h
	src/net.cpp
	src/net.h
	src/test/test_bitcoin.cpp
port stake miner to boost::thread_group
Clean up shutdown process

Conflicts:
	src/init.cpp
	src/init.h
	src/main.cpp
	src/net.cpp
	src/net.h
	src/txdb.cpp
	src/util.cpp
	src/util.h
	src/walletdb.cpp
Have Qt poll for shutdown requested, the QT way.

Conflicts:
	src/qt/bitcoin.cpp
	src/qt/bitcoingui.cpp
	src/qt/bitcoingui.h
Reimplement click-to-pay links. Add OSX support.

Switch to using Qt's QLocalServer/QLocalSocket to handle bitcoin
payment links (bitcoin:... URIs)

Reason for switch: the boost::interprocess mechanism seemed flaky,
and doesn't mesh as well with "The Qt Way"

qtipcserver.cpp/h is replaced by paymentserver.cpp/h

Click-to-pay now also works on OSX, with a custom Info.plist
that registers Bitcoin-Qt as a handler for bitcoin: URLs and
an event listener on the main QApplication that handles
QFileOpenEvents (Qt translates 'url clicked' AppleEvents into
QFileOpenEvents automagically).

Conflicts:
	src/qt/bitcoin.cpp
	src/qt/qtipcserver.cpp
	src/qt/qtipcserver.h
build: prepare to move DetectShutdownThread