Edit function: deleting and merging items

Need to add a few more functions to completely remove items (delete from
mediatfiles, types, predicates, subjects, persons, etc. tables).

But mainly works.