Move Grails support code from plugin to a module

This is necessary as the code doesn't compile with Grails 2.4 due to
changes in the way that sitemesh layouts are applied, and we want
people to be able to install the plugin for all 2.x versions of Grails.