PDB-473 Support POST using application/json data in the body

This patch adds to the commands end-point the ability to simply POST using
application/json with the JSON content in the body.

It also switches the terminus to use this mechanism.

We found that the url encode/decode required to support x-www-form-urlencoded
was actually quite an overhead in a number of ways:

* The urlencode on the terminus added overhead
* The urldecode in the server added overhead
* The interim strings created during this encode/decode process can get quite
  large increasing the amount of garbage collection required

This feature has been implemented by providing a new middleware that will move
the body into the parameter :body-string of the request when the content-type
is not set to application/x-www-form-urlencoded. This provides a convenient
backwards compatible layer so that the old form url encoding can still be
supported for older versions of the API.

Signed-off-by: Ken Barber <ken@bob.sh>
PDB-473 Add a content-type verification middleware

Signed-off-by: Ken Barber <ken@bob.sh>
PDB-473 Additional tests for verify-content-type and other cleanups

Signed-off-by: Ken Barber <ken@bob.sh>
PDB-473 Convert submit-command-via-http! to use application/json POST

Signed-off-by: Ken Barber <ken@bob.sh>
PDB-473 Use (seq foo) on its own

Signed-off-by: Ken Barber <ken@bob.sh>
PDB-473 Adapt for new queue message format

PDB-472 changes the format of the messages received from the queue so that
headers are top-level. This patch just ammends the work to support that.

Signed-off-by: Ken Barber <ken@bob.sh>
Merge pull request #880 from kbarber/ticket/master/PDB-473-raw-json-posts

PDB-473 Support POST using application/json data in the body