Fixed warnings from ‘go vet’ in Go 1.2

Mostly by using a new function HTTPErrorf() instead of constructing an
HTTPError struct directly.