pull metadata parsing/extraction code into a general helper
fix metadata support in query.rb output formats
move metadata processing out of the FogServiceInterface