Fix etag update

Make sure that not only the etags from the parent directories gets updated but also the etag of the actual file after it was touched. This should fix issue #3280 

Further change the copy operation to a rename operation if a versions gets restored to make sure to not end up with only one version which is exactly the same as the actual file.