GROOVY-5249 reduce locking in ClassInfo.getMetaClass(Object)
GROOVY-5249 ClassInfo refactoring: extract method isValidWeakMetaClass and use it also in getMetaClassForClass() method
GROOVY-5249 ClassInfo refactoring: extract method
GROOVY-5249 fix concurrency bug when calling ClassInfo.setWeakMetaClass or setStrongMetaClass
- previously an existing weakMetaClass ManagedReference instance was just forgotten and never cleared.
- call ManagedReference.clear() for possible previous instance in weakMetaClass field
GROOVY-5249: try to reduce the number of data races by reducing the number of reads
utility method refactoring
Revert "GROOVY-6579: Groovy Console not responsive when running the closure"

This reverts commit 466b0955cc6e159fb8d00ad7a1225cb3d278c094 because it triggers a JVM crash under undefined circumstances...