Support hostnames with multiple components in custom repository addresses

The current implementation of private repository support handles only example.com/repo format of image names. These changeset adds support for subdomains (e.g. docker.subdomain.example.com/repo) and custom port specifications (docker.example.com:45411/repo).