Rework http timeout handling to avoid string matching.
Rework http timeout handling to avoid string matching.

This was previously relying on a specific string from the net/http
package, which is somewhat brittle.  The errors returned from the
net/http pagkage are actually instances of http.httpError - a private
type that implements net.Error.  This means that we can actually just
test for something that implements net.Error and use the Timeout()
method to detect timeout errors.

This has reduced the duplication here as net.OpError also implements
net.Error.

lukaszraczylo/router,lukaszraczylo/router,alphagov/router