Added support for multiple endpoints in X-Docker-Endpoints header

This allows docker to properly parse notation such as

    X-Docker-Endpoints: registry-1.docker.io, registry-2.docker.io

The previous implementation supports 

    X-Docker-Endpoints: registry-1.docker.io
    X-Docker-Endpoints: registry-2.docker.io

But most proxies and gateways concatenate these headers, as per [RFC 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2).

This patch will support both notations. Unit tests were also extended to account for this change.