Added merge() to ResourceCollectionInterface
Improved error handling in the repository classes
Added class CompositeRepository. Closes #11