Spring Bean Builder by using Groovy.

This code is originally from Grails but modifications are made since then to make the syntax more consistent.

## Changes to the original code

Our version has support for getting rid of surrounding "bb.beans { ... }" if the script is parsed via the `BeanBuilder.parse()` method.

Anonymous bean definition syntax is changed to `bean(CLASS) {...}` from `{CLASS _ -> ...}` to increase consistency with named bean definition.