fix memory problems as reported at #3620
fix for path_hash not unique as reported at #3641
Merge branch 'master' into fixes_for_3641_3620
Merge pull request #3715 from owncloud/fixes_for_3641_3620

files_encryption: bug fixes for reported problems.