Update metadata handling to be consistent with Compute

This may not be the most optimal solution, but it was relatively quick to implement and not very intrusive on the main code. Tests are another matter, but that's unrelated to the approach and rather a reflection of changing formats. Also there is something of a precedent for this approach with the handling of datetime serialization.

I wanted to get this in quickly because QE seems to be doing a lot of work around the metadata and if it's going to change it needs to happen soon so they can adjust.