replace couchforms update handler with python equivalent

Experimental **do not merge**

Curious what people think, especially @czue 

Meat of the PR is here: https://github.com/dimagi/couchforms/pull/71