Allow lazy instantiation of metric in GetOrRegister.

Fix also memleaks in GetOrRegister* due to this
non-lazy instantiation.