HHH-8095 & HHH-8096 - improved support for the OSGi JPA service

I made these changes as part of writing the "180 runtimes in 180 minutes" tutorial for EclipseCon 2013. They get Hibernate 4.2 working fairly reliably as a JPA service, and should be easy to migrate to master.