Clean up metadata.h and fix Doxygen markup.

Comment and whitespace changes only, no functional or semantic changes.