Don't merge value objects

The bundle currently tries to call $om->merge() on value objects,
defined with (local), too. This causes:

Notice: Undefined offset: 0 in vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php line 729

This PR checks whether an object has identity before trying to merge it.
Extracted function
Merge branch 'fix-value-object-merge'
Return references. Fixes #33, #34