BaseDoubleCheck
A Lazy and Provider implementation that memoizes the value returned from a delegate Provider. The provider instance is released after it's called.
Platform-specific synchronization is provided by the Lock superclass (ReentrantLock on JVM, reentrant spinlock on native, no-op on JS/Wasm).
Ported from Dagger's DoubleCheck with modifications for KMP support.