The existing .registerProvider() without a leading .asPrototype() is already a "lazy only once" style provider. This change uses that and then removes the LazyProvider and registerLazy() as they are no longer needed or used.
This also changes the synchronized block to use a ReentrantLock in OnceProvider just in case the provider invocation does something interesting and using Java 21+ Virtual Threads.
Extracted this refactoring from #540
The existing .registerProvider() without a leading .asPrototype() is already a "lazy only once" style provider. This change uses that and then removes the LazyProvider and registerLazy() as they are no longer needed or used.
This also changes the synchronized block to use a ReentrantLock in OnceProvider just in case the provider invocation does something interesting and using Java 21+ Virtual Threads.