Add 'chainwork' to getblock

Returns nChainWork from the block index, the total work done by all
blocks since the genesis block.
Merge pull request #2852 from petertodd/getblock-chainwork

Add 'chainwork' to getblock