make sure that we only remove file/folder shares
fix escaping
Merge pull request #5206 from owncloud/cleanup_share_table

share table clean-up: make sure that we only remove files/folders