move versions if a file was renamed in a shared folder

get the source path and owner in a pre hook and the target path and owner in a post hook

fix #11761

cc @PVince81 
don't think that it has any practical impact, this code is there for ages. But I changed it.