Add validation for undo_vote_for to avoid a crash
Merge pull request #116 from aboudreault/vote-unvote-crash

Add validation for undo_vote_for to avoid a crash
Added thread_type.
Updated test.
Clear endorsement for children if needed.