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
Strangely, when I cache unitOfWork, during some unit tests, the converter utility construct is passed an entity manager without the unitOfWork property set. So the cached version of unitOfWork is null, but by the time it gets to call flattenIdentifier the unitOfWork property of em is correctly set. I have been digging around and I can't see how the unitOfWork property wouldn't be set. Any ideas?