[BUGFIX] Enhance entity classname detection in repository constructor
Fix bug where all occurrences of the word "Repository" were stripped
out during the automatic retrieval of the entity classname. This changes
the behavior in the way, that only removes the last occurrence.
Releases: 1.0, 1.1