Clear record when doc_type was changed

@czue http://manage.dimagi.com/default.asp?140716#785508
I think you meant `_rev`. Checked this locally and `10` is right - even before this PR. Weird that this didn't come up before. Also this is a pretty rubbish assert but can fix that later.