GRAILS-11670 - test invoking readOnly in a criteria query

If you merge this pull request onto your GRAILS-11670 branch then this commit will become part of the pull request at https://github.com/grails/grails-data-mapping/pull/42.  I could just apply your pull request and then push this commit myself but making this commit part of your pull request makes the pull request more complete and might help if anyone has to revisit your pull request for some reason in the future.