Catch exceptions correctly in async RPC calls.
Only lock in map update timer when available.

Only lock the mutex cs_main in the UI map update timer when the lock is
immediately available and skip update ticks if this is not the case.
Add -DBOOST_SPIRIT_THREADSAFE for daemon.
Mitigates boost/spirit json crash
Make some printf's conditional on fDebug.

Reduce debug.log chatter by making the most common printf's conditional
on fDebug.
Show player path always on top.
Show height and hash in block ACCEPTED message.
Add algo to ACCEPTED block message.
Show extra debug output in Reorganize().

In Reorganize(), show old, new and common fork point in the debug output
log information.
Add getchains RPC command.

Implement a new "getchains" RPC command, that returns all heads of
blockchain forks known.
Add branch info to getchains.

Add additional result fields to getchains output that show the branches
connecting the heads to the main chain.
Add extra debug output for GetGameState.

Add some more debug.log output for GetGameState, for the case that the
state has to be calculated and is not yet saved.
Implement game state cache.

Cache the last 10 game states calculated, not just the current state.
Change version to 1.00.06.
Increase default limit for relaying free tx to 1KB/s (60KB/minute)
Show ip in 'version message'
Prevent stuck block download in large reorganisations

In cases of very large reorganisations (hundreds of blocks), a situation
may appear where an 'inv' is sent as response to a 'getblocks', but the
last block mentioned in the inv is already known to the receiver node.
However, the supplying node uses a request for this last block as a
trigger to send the rest of the inv blocks. If it never comes, the block
chain download is stuck.

This commit makes the receiver node always request the last inv'ed block,
even if it is already known, to prevent this problem.
Prevent stuck download: correct solution

Pull request #948 introduced a fix for nodes stuck on a long side branch
of the main chain. The fix was non-functional however, as the additional
getdata request was created in a first step of processing, but dropped
in a second step as it was considered redundant. This commits fixes it
by sending the request directly.
Hopefully final fix for the stuck blockchain issue

Immediately issue a "getblocks", instead of a "getdata" (which will
trigger the relevant "inv" to be sent anyway), and only do so when
the previous set of invs led us into a known and attached part of
the block tree.
Speed up RPC authentication (reworked pull from Joel Katz)