Fix issue with ClassMetadataFactory not inheriting association mappings properly.
Misc. UnitOfWork cleanup.