Make reassign cases use secure post

The last commit is the basic change, the first commit is small changes needed to make this possible. (The middle commit is just whitespace.)

fixes: http://manage.dimagi.com/default.asp?88367