implement generic metadata provider registration/unregistration

Implementation details are handled cleanly by a support class and the
world-scoped metadata is handled as well by implementing the registry
per-class instead of per-object.