Per-peer block download tracking and stalled download detection.

Keep track of which block is being requested (and to be requested) from
each peer, and limit the number of blocks in-flight per peer. In addition,
detect stalled downloads, and disconnect if they persist for too long.

This means blocks are never requested twice, and should eliminate duplicate
downloads during synchronization.
always show syncnode in getpeerinfo (fixes #2717)
Display progress of rescan.
Add progress to initial display of latest block downloaded.
Get rid of C99 PRI?64 usage in source files

Amend to d5f1e72. It turns out that BerkelyDB was including inttypes.h
indirectly, so we cannot fix this with just macros.

Trivial commit: apply the following script to all .cpp and .h files:

    # Middle
    sed -i 's/"PRIx64"/x/g' "$1"
    sed -i 's/"PRIu64"/u/g' "$1"
    sed -i 's/"PRId64"/d/g' "$1"
    # Initial
    sed -i 's/PRIx64"/"x/g' "$1"
    sed -i 's/PRIu64"/"u/g' "$1"
    sed -i 's/PRId64"/"d/g' "$1"
    # Trailing
    sed -i 's/"PRIx64/x"/g' "$1"
    sed -i 's/"PRIu64/u"/g' "$1"
    sed -i 's/"PRId64/d"/g' "$1"

After this commit, `git grep` for PRI.64 should turn up nothing except
the defines in util.h.
Remove definition of PRI?64 in util.h

This was a bad idea. This can't be solved with macros as any
other library that includes inttypes.h will get in the way.

The parent commit has removed all usages from the source, this commit
removes the definition.
Document that CPubKey.IsValid() is consensus critical
Require OSX 10.6, 64-bit

Drop support for 32-bit or pre-10.6 Macs.

Also, some of the OSX build docs hadn't been updated since the
autotools change.
Replace PrintException with PrintExceptionContinue + throw

Just a pet peeve.

(PrintException has exactly the same body as PrintExceptionContinue but
does a re-throw at the end. Move these re-throws to the call
site, this aids understanding what is going on as well as eliminates a
bit of code duplication in util.cpp)
convert tabs to whitespace in bitrpc.py

This is a minor change to bitrpc.py to conform with the formatting of
the other python source code in the repo.
Remove CWalletTx::vfSpent

Use the spent outpoint multimap to figure out which wallet transaction
outputs are unspent, instead of a vfSpent array that is saved
to disk.
Merge pull request #3735 from laanwj/2014_02_remove_PRIx64_completely

Remove PRIx64 usage completely
script: reduce OP_RETURN standard relay bytes to 40

Per mailing list discussion.
Merge pull request #3737 from jgarzik/op-return-size

script: reduce OP_RETURN standard relay bytes to 40
Add shell null to else block

MinGW-W64-builds-4.2.0 shell doesn't like the empty else blocks.
Merge pull request #3749

4423571 Replace PrintException with PrintExceptionContinue + throw (Wladimir J. van der Laan)
move wallet info stuff to "getwalletinfo" rpc (left original wallet
stuff in getinfo call for backwards compatibility)

add wallet transaction count to getwalletinfo rpc call
Update build information

Add the command necessary to add ppa repository in Ubuntu

Refs #3757
Update build instructions for db4.8 on Debian and Unix
Merge pull request #3752

5d5b0d2 Add shell null to else block (Wil Bown)