Formalize Metadata management into a Manager class

This allows, among things, better flexibility in the future, and a way
for the PluginManager to clear metadata providers on plugin shutdown.