ClassHelper changes for Groovy 2.1 and 1.8

Ensure ClassNode generation is consistent even with
Annotation and Enum types.