registry/session: fix panic in GetRemoteImageLayer

Fixes #7860
If we need to, we probably need to do that here as well: https://github.com/unclejack/docker/blob/fix_panic_registry_session/registry/session.go#L118
But I suspect, if net/http's cllent.Do returns an error, we don't need to close anything. But that needs to be verified.