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

Reverts groovy/groovy-core#540
This seems to cause build failures