singleton
Creates a singleton: will create an instance on first request and will subsequently always return the same instance.
T generics will be erased!
Return
A singleton ready to be bound.
Parameters
T
The created type.
creator
The function that will be called the first time an instance is requested. Guaranteed to be called only once. Should create a new instance.