Fix deletion of terms in a vocab, and add pre-delete handler (not yet used)