GRAILS-11670 - support readOnly criteria queries in unit tests

There is already a TestGormEnhancer in grails-data-mapping.  It is in the grails-datastore-gorm-test subproject.  To use that here we would need to either add a dependency on that module or move the class to a module that is already depended on.