Support for forms

This should (hopefully) get forms working.

For anything except a GET request, it actually "stays on the same page", and changes the URI in the location bar using `history.pushState()`.

The only problem with this is that `history.pushState()` is subject to the same-origin policy, so it will only work when POST/PUT/DELETEing data within the same domain.