HTTP REST API infrastructure - fixes 886

Fixes #886.

Code is still camelCaps, we can fix that later sometime. Some code is still unported, in particular the Sphinx extension; we can do that when we get to writing documentation.
I don't think this needs to be done in Eliot, it can easily be done here by adding a class method