Add JSON-RPC 1.0 support

Adds JSON-RPC 1.0 support, defaults to using 2.0. Version is set in the options.

May be a bit rough around the edges, but otherwise should conform to the spec and passes the added tests.