filter duplicates directly in the sql query
Merge pull request #5411 from owncloud/ocs_share_api_cleanup

filter duplicates directly in the sql query