add preDelete hook for files_versions app

please review @icewind1991 @karlitschek @DeepDiver1975