prequest: add support for PUT and PATCH

Fixes #877.  The tests may need more work, I copy-pasted from test_post without looking into all the helper objects/methods.  I tested PUT and PATCH manually and they work as expected.