GROOVY-7181: Change DefaultGroovyMethods inject impl. to avoid closure arguments mutation

Change DefaultGroovyMethods inject impl. to avoid closure arguments mutation,
it creates problem currently for memoization because of
Arrays.asList(Object[] params) use as key for caching value but during
the iteration underlying array modified and which is breaking
java.util.Map contract.
GROOVY-7112: Correct memoization array parameter name generation

For class/interface array java type name generated using following
encoding: 'Lclassname;', now for array type using componentType.class +
'Array' to avoid ';' invalid character
GROOVY-7186: Close URLConnection getInputStream() after testing for availability
Merge pull request #543 from armsargis/GROOVY-7112

GROOVY-7112: Correct memoization array parameter name generation
Merge pull request #542 from armsargis/GROOVY-7181-ALTERNATIVE

GROOVY-7181: Change DefaultGroovyMethods inject impl. to avoid closure arguments mutation
Merge pull request #540 from armsargis/GROOVY-7186

GROOVY-7186: Try to open URLConnection in finally block
Revert "GROOVY-7186: Try to open URLConnection in finally block"
Merge pull request #544 from groovy/revert-540-GROOVY-7186

Revert "GROOVY-7186: Try to open URLConnection in finally block"