Fixed a bug so that a versioned entity with a oneToOne id can be created

- Fixed the basic entity persister so that versioned OneToOne entities can be created
- Created an IdentifierConverter utility class
- Moved the logic for the flatten identifier method into the new utility class
- Replaced calls for private flattenIdentifier to use new utility
- Added appropriate unit tests
I can see a benefit to caching unitOfWork, but I'm not sure caching metadata factory would make much difference, I would probably end up creating a getClassMetadata method inside here which will do exactly what the em::getClassMetadata method does