Move HTTP client to var

So that we can re-use it across tests. Meaning that we don't have to
redefine it, and it's more efficient.
Add flag for originPort

This will be the port an HTTP server listens on for requests from the CDN.
It's HTTP for the moment - we'll switch to HTTPS later.
Add CDNServeMux helper for origin server

ServeMux with an updateable handler, so that tests can pass their own
functions to make assertions about the requests received or emit their own
responses.

Includes a test to make sure that it works as intended. This is all in a
separate file so as not to clutter the main tests. It gets imported
automatically because it's part of the "main" package.

I had originally envisaged that we'd spawn a new server for each test, but
that's not practical because:

- DefaultServeMux doesn't allow you to unregister handlers and I didn't have
  any luck replacing the entire ServeMux associated with an http.Server
- We need to keep the server up and responding to probe health checks for as
  long as possible otherwise the CDN will mark it as down.
CDNServeMux always respond to HEAD probes

So that the CDN doesn't mark our origin as down and we don't have to handle
these explicitly in each test case. We might need to provide a flag for
turning this off when we come to test failover scenarios.
Complete TestProtocolRedirect

Complete this test by making it fail if our serve receives a request..

This will always be prone to false results - i.e. it will pass when the CDN
has been configured to point to another origin - because we're testing for
the presence of something that shouldn't be there.
Panic on http.ListenAndServe error

So that we don't attempt to run the tests against another instance of `go
test` running on the same machine.

This won't catch, at least on OS X, the case of another process (no our
tests) binding to the TCP4 port only. It seems that Go will happily just
bind to TCP6.

Using the somewhat frowned panic() because we don't have access to testing.T
in init(). Part of the reason it's frowned upon is that we can't write a
test for it.
Timeout client requests after 5s

So that we're not waiting around a long time for requests that have gone
into a blackhole. The default is infinite and the test runner will timeout
after 10m.
Range over preset status codes for handlers test

To make it clear that we're testing a set of status codes. The previous code
was ambigious because the variable was called `i` and we were incrementing
it in steps of 100, so it wasn't immediately obvious that it was a status
code.
Don't fail helper tests early

Use t.Error instead of t.Fatal so that we continue executing the current
test and collect all errors rather than aborting early.

I had originally intended these to fail the entire test suite if our helpers
weren't functioning correctly, but that's now the way that Fatal/FailNow
works.
Improve error messages for CDNServeMux tests.
Improve help text for -originPort.
Merge pull request #1 from alphagov/origin_server

Add HTTP server and complete ProtocolRedirect test