GPMONGODB-364: Fixed leaking mongo connections on webapp shutdown.

This is a fix for http://jira.grails.org/browse/GPMONGODB-364.