[#1827] build em factory after we have redefined Hibernate's classloader

Otherwise Play doesn't start in precompiled mode with Hibernate throwing ClassNotFoundExceptions for entity classes.
Merge pull request #767 from codeborne/hibernate-classloader-fix

[#1827] Fix Play 1.3 starting in precompiled mode