Add some guest rrd plugin helper functions.

Mostly copied from the perf-tools.hg repo.

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