Adds a singleton dependency that will be created once and reused.
void addSingleton<T>(Function constructor, {String? key});