Partial fix for GPSRINGSECURITYUI-58

This is a partial fix for https://jira.grails.org/browse/GPSPRINGSECURITYUI-58. It adds support for MongoDB by converting the HQL queries in the user, role, and registration code controllers. Users and roles have been tested, but registration codes have not.