registry/session: fix panic in GetRemoteImageLayer

Fixes #7860
Okay, so I did some code diving:

This is the only pathway to having both a non-nil error, and a non-nil response: https://code.google.com/p/go/source/browse/src/pkg/net/http/client.go?name=go1.3.1#376

That pathway is only reached when Client.CheckRedirect returns an error:
https://code.google.com/p/go/source/browse/src/pkg/net/http/client.go?name=go1.3.1#331
https://code.google.com/p/go/source/browse/src/pkg/net/http/client.go?name=go1.3.1#280

The HTTP client used for the registry has a custom CheckRedirect, which NEVER returns an error. Hence, we never hit the pathway to redirectFailed and thus we don't need to close the body.

Instead of depending on such a weird codepath, it is so much easier to do `if res != nil { res.Body.Close() }` (`res.Body` is never nil: https://code.google.com/p/go/source/browse/src/pkg/net/http/response.go?name=release#48) and that should be guaranteed by go1 compatibility.