MacroGroovy

Hi!

I would like to donate my MacroGroovy project to groovy-core. Since it shares code with AstBuilderTransformation, I decided to refactor existing code of it because I don't want to make duplicates. 


It's still in "work in progress"  state and i'm expecting comments and suggestions from you.
Does this assertion really work? I mean does it check anything else than equality between types (e.g. ClassNode == ClassNode) and that the superclasses are ok? I thought that it would recursively check whether two ClassNodes are logically the same?

I was trying to write a test to check the MacroClass in terms of creating methods of different visibility:

```
 def result = new MacroClass() {
            class A {
                private void privateMethod(){}
                protected String protectedMethod(){return "OK"}
                public long publicMethod(long arg){return arg + 1L}
                @PackageScope void packageScopeMethod() {}
            }
        }
```

this doesn't compile due to:

```
startup failed:
/tmp/g/subprojects/groovy-macro/src/test/groovy/groovy/SimpleMacroTest.groovy: 60: [Static type checking] - Cannot return value of type java.lang.String on method returning type String
 @ line 60, column 59.
   ring protectedMethod(){return "OK"}
                                 ^

/tmp/g/subprojects/groovy-macro/src/test/groovy/groovy/SimpleMacroTest.groovy: 61: [Static type checking] - Cannot find matching method java.lang.Object#plus(long). Please check if the declared type is right and if the method exists.
 @ line 61, column 63.
   icMethod(long arg){return arg + 1L}
                                 ^
```

so I reverted that cause I wanted to check whether simple stuff can be done:

```
def result = new MacroClass() {
            class A {
                private void privateMethod(){}
                protected String protectedMethod(){return null}
                public long publicMethod(long arg){return 1L}
                @PackageScope void packageScopeMethod() {}
            }
        }
```

now that worked. Then I created manually the statments that should form the expected ClassNode. TO my surprise it worked at a first time! Of course I knew that it's impossible for me not to have made a mistake ;) So I tried to check how does this assertion work and I wrote sth like this:

```
assertSyntaxTree(new ClassNode(CodeVisitorSupport), result);
```

Which of course doesn't make any sense (or it least it shouldn't) but the assertion passed! Both are ClassNodes and don't have supertypes. 

Maybe I've done sth wrong and shouldn't have written it here so sorry for my potential stupidity ;)