Import JSON serialisation code

This removes the dependency on xcp-rrdd-plugin, which should instead
depend on this library.

Signed-off-by: John Else <john.else@citrix.com>