First stab at adding MetadataManager

This is NOT ready to merge yet. I'll be adding implementation for the functions in the next couple of days.
I don't see any particular reason for these to be declared as they are.  They're essentially inline function definitions that would be better suited to being defined as standalone functions.  Can we move these out into their own definitions?