rpc: add `getblockchaininfo` and `getnetworkinfo`

Adds two new info query commands that take over information from hodge-podge `getinfo`.

Also some useful new information is added:
- `getblockchaininfo`
  - `chain`: (string) current chain (main, testnet3, regtest)
  - `verificationprogress: (numeric) estimated verification progress
- `getnetworkinfo`
  - `numblocksofpeers`: (numeric) number of blocks of peers, as estimated from version messages; same as shown in the GUI
  - `localaddresses`: (array) local addresses, from mapLocalHost (fixes #1734)

Example `getnetworkinfo`:
```js
{
    "version" : 99900,
    "protocolversion" : 70002,
    "timeoffset" : 0,
    "connections" : 8,
    "proxy" : "",
    "relayfee" : 0.00001000,
    "numblocksofpeers" : 299197,
    "localaddresses" : [
        {
            "address" : "89.98.179.240",
            "port" : 8333,
            "score" : 4
        }
    ]
}
```

Example `getblockchaininfo`:
{
    "blocks" : 299197,
    "difficulty" : 8000872135.96816349,
    "chain" : "main",
    "verificationprogress" : 0.99998904
}