Add singleton registry

* Adds SingletonRegistry for ensuring only a single
  object is registered at a given point.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
Merge pull request #13 from lnielsen-cern/singleton-registry

Adds singleton registry.