Allow lazy instantiation of metric in GetOrRegister.

Fix also memleaks in GetOrRegister* due to this
non-lazy instantiation.
Merge pull request #45 from laurent-descrivan/master

Allow lazy instantiation of metric in GetOrRegister.