Encryption replace delete proxy with pre/post hooks and add tests

Move the delete method from a pre-proxy to a combination of pre and post hooks. The pre hook resolves the real path and owner of the deleted file and the post hook removes the encryption keys if the file was really deleted.

Added tests, which catches also the case where a shared file gets deleted and the owner has a file with the exactly same name and folder structure. Maybe this was the reasons why people lost some encryption keys here: #7026