file delete cleanup

remove related data records when removing a file. replaces https://github.com/concrete5/concrete5/pull/1020/