Squashed 'src/leveldb/' changes from be1b0ff..936b461

936b461 Merge upstream LevelDB 1.13.
748539c LevelDB 1.13

git-subtree-dir: src/leveldb
git-subtree-split: 936b4613ea4551992e6096b1e05eeefc09a20e3b
Merge src/leveldb changes for LevelDB 1.13
Added ping time measurement.
New RPC "ping" command to request ping.
Implemented "pong" message handler.
New "pingtime" field in getpeerinfo, to provide results to user.
New "pingwait" field, to show pings still in flight, to better see newly lagging peers.
sendcoinsentry: small clear() and setValue() changes

- clear(): clear all UI elements (for secure and insecure payments)
- setValue(): only modify UI elements, which need to be set (for secure
  or insecure payments)
sendcoinsdialog: display real failed address string

- display the real string (faulty address), which causes the valid address
  check to fail, instead of a stringified "nonsense" CBitcoinAddress
paymentserver: use own HTML-esc / add new header const

- make processPaymentRequest() use our own HTML-escaping function from
  GUIUtil
- make string "application/bitcoin-payment" a constant (below similar
  constant strings in the .cpp file)
don't touch addressbook when using secure payment-requests

- fixes #3006 by preventing addressbook changes when using
  secure payment-requests

sq
Refactor/encapsulate chain globals into a CChain class
Update michagogo's gitian pgp key, adding UIDs
Documentation Cleanup in /Doc

Added some help text, and bumped version numbers.

Added a Readable Index for /Contrib

Fixing /Contrib Index URLs

Revert Version Numbers.
Merge pull request #2937

971bb3e Added ping time measurement. New RPC "ping" command to request ping. Implemented "pong" message handler. New "pingtime" field in getpeerinfo, to provide results to user. New "pingwait" field, to show pings still in flight, to better see newly lagging peers. (Josh Lehan)
Add network traffic graph
[doc] Add testnet hidden service port to the example tor config.

Seems like there are a lot of advertised testnet HS nodes that
don't actually work. Lack of the testnet port on the example
HS config might be one reason.
Merge pull request #3089 from gmaxwell/hsport

[doc] Add testnet hidden service port to the example tor config.
Merge pull request #2933 from sipa/leveldb113

Merge upstream LevelDB 1.13
Merge pull request #3077 from sipa/chain

Refactor/encapsulate chain globals into a CChain class
Avoid core dump if rpc port is in use.

The cleanup code needs to check for NULL rpcworkers thread group.
Reimplement CBlockLocator's chain-related logic in CChain.

This removes a few unused CBlockLocator methods, and moves the
construction and fork-finding logic to CChain (which can do these
more efficiently, as it has a height-indexable chain available).
It also makes CBlockLocator independent from the validation code.
Move CBlockLocator to core.h

As CBlockLocator is a P2P data structure, and independent from the
validation logic, it can be moved to core.
misc spelling / space / style fixes