Fixed bug in entity manager factory.

- the factory always returned a shared manager instance instead of a new one

Change-Id: Ieb805c97d61f627e86868ba3962b1868db1deb1e