Added initial implementation of JSON-RPC (version 2) communication

This will later replace current Ajax calls in the HRM, since we need
more flexibility.