Refactor parseMetadata.
Refactor parseMetadata.

This moves most of the functionality into reusable helper methods, to make it
easier to add new metadata in the future.

R=kevmoo@google.com

Review URL: https://codereview.chromium.org//1093313002

kevmoo/test,greglittlefield-wf/test,apwilson/test,d2m/test,kevmoo/test,kevmoo/test,iglherme/Guttiest,grouma/test,grouma/test,grouma/test,d2m/test,greglittlefield-wf/test,iglherme/Guttiest,greglittlefield-wf/test,iglherme/Guttiest,apwilson/test,d2m/test,apwilson/test