Alternative System.Lazy implementation (dotnet/coreclr#8963)
* Remove use of lock for PublicationOnly
This involves a little bit of trickery. In avoiding the lock we need to
go from m_implementation as PublicationOnly to null in a single step. We
can't do this though without another object, so we reuse out Lazy
object, which basically just spins its wheels until the value is ready.
This shouldn't be a very common scenerio (i.e. hitting that code path)
but it is possible.
* Minimize additional object creation
Storing factory in Lazy object, and passing Lazy as a parameter to
ILazyItem functions. This means that None & PublicationOnly now need no
creation of secondary object.
* Remove Func<T> for default constructor invoking
Fixing startup performance concerns
* Moved non-generic functionality out of Lazy
...and into a helper class
* Expression-bodied functions
Commit migrated from https://github.com/dotnet/coreclr/commit/
2453adf1afba45dec79c6c643623b656702a17de