GROOVY-6376: Add @BaseScript AST transformation

minimal clean-up
removed duplicated log4jVersion and logbackVersion variables (introduced by faulty merge of GROOVY-6338)