Clear record when doc_type was changed

@czue http://manage.dimagi.com/default.asp?140716#785508
```delete = self._table.delete(self._table.c.doc_id == self.id)```