common: make curl fail on HTTP errors

By default curl just prints the response body even if the server
answered with an error code (eg. 404).

To avoid storing invalid data in the cache, ask curl to be more strict
and error out when the server replies with an error code.
mk: exit cleanly when failing to download the requested package

Now that curl is refusing to download invalid contents, cleanly handle
the case where the uses asked for an invalid version and the server
replied with 404:

$ nv mk my_env --go-prebuilt=invalid
Creating environment: my_env ...
 * installing go-prebuilt==invalid ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404 Not Found
envirius: failed to download 'https://go.googlecode.com/files/goinvalid.linux-amd64.tar.gz'
envirius: unable to fetch source file for go-prebuilt==invalid