Add a public API for getting and setting the global metrics registry.

This is useful for extending yunomi with things which will optionally use the global metrics registry.