Fixed searchByMime in shared cache

- searchByMime now correctly returns files recursively search through
  all the dirs
- added unit test for searchByMime
Merge pull request #7089 from owncloud/sharing-searchbymime

Fixed searchByMime in shared cache