Refactor store_spec

Use entity_references for setting up the spec preconditions.
This avoids ugly double expectations and is friendly for the
refactoring, that has to be done.
Extract logic into DataMapperWrapper
Add Repo#pointer
Remove cls from unmap
Fix resolver namespace error