DATAJPA-396 - CriteriaQuery caching causes problems with Hibernate name generation in threaded environments.

Renamed field "query" in QueryPreparer to "cachedQuery" to make it's purpose more clear. Extracted EntityManager query creation into new  QueryPreparer.createQuery(CriteriaQuery) method to deal with the conditional synchronization.