Refactored construction of the EntityManager out to an EntityManagerFactory

Added tests for the factory (needed to refactor the OrmTestCase so I could reuse mock config and mock connections).

This pattern is well established in Hibernate, I've been wondering why we don't have it in Doctrine.
@Ocramius why not? It's not the EntityManager's responsibility to create EntityManagers, we both know static access complicates unit testing for consumers and, lets face it, it seems there is more to building an EntityManager than just calling `new EntityManager`.