JSON-RPC client module

Includes some changes in the server module (jsonrpc2), e.g. exporting some types that we need in the client module.