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
  - `bestblockhash`: (string) the hash of the currently best block
  - `chainwork`
- `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,
    "localaddresses" : [
        {
            "address" : "89.98.179.240",
            "port" : 8333,
            "score" : 4
        }
    ]
}
```

Example `getblockchaininfo`:
```js
{
    "chain" : "main",
    "blocks" : 299320,
    "bestblockhash" : "00000000000000000fe7330173c917964dff6c763478a8ad7ee18998069bcfff",
    "difficulty" : 8000872135.96816349,
    "verificationprogress" : 0.99996298,
    "chainwork" : "0000000000000000000000000000000000000000000055887ab265d0a5977101"
}
```

This is analogous to `getwalletinfo` that was introduced by pull #3717.