Metadata can now be returned to clients

Add configuration option for parsing metadata back to clients.
Extended ValueReader interface to allow metadata to be added back into
the result
Extended integration tests with the new functionality

Relates #275
Support 'rich' json objects as script parameters

Allow non-values to be passed as scripts. unfortunately the data needs
to be re-parsed and written back as, due to encoding, there is no
reliable way to copy the byte array directly

Fix #277

(cherry picked from commit 63ae2bdcc1d9696eb70f227d0643dfa54a333102)