GROOVY-5907 Object.with seems to lose typing when generics are used

Conflicts:
	src/main/org/codehaus/groovy/transform/stc/StaticTypeCheckingVisitor.java
GROOVY-5907 Object.with seems to lose typing when generics are used (minor tweaks)
Fix unused method appearing due to cherry-pick