Fix file cache updater

This fixes bug https://github.com/owncloud/core/issues/5098
For a detailed explanation how to reproduce it look at: https://github.com/owncloud/mirall/issues/1056#issuecomment-25524490

@icewind1991 please have a look. correctFolder() always assumed that we are operating on a folder owned by the current user which of course is wrong in case of a shared file. That's why I changed resolvePath() to resolve the path to the owners path and updated the correctFolder() method to loop though the correct folder tree.

Also affects master, will port it once the fix is merged for stable5.