Implement frontend of RRD plugin handshake.

Signed-off-by: John Else <john.else@citrix.com>
Add some guest rrd plugin helper functions.

Mostly copied from the perf-tools.hg repo.

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