GRAILS-7974 fix (concurrency bug in convertIdentifier) + use @CompileStatic in HibernateGormStaticApi

This makes HibernateGormStaticApi use @CompileStatic and fixes the concurrency bug in convertIdentifier method (http://jira.grails.org/browse/GRAILS-7974). 
ConvertIdentifier has been optimized to use Groovy's asType for converting the id to a java.lang.Number class. SimpleTypeConverter will be used as the last option in conversion.