registry: refactor registry.IsSecure calls into registry.NewEndpoint

Signed-off-by: Tibor Vass <teabee89@gmail.com>
Put mock registry address in insecureRegistries for unit tests

Signed-off-by: Tibor Vass <teabee89@gmail.com>
registry: parse INDEXSERVERADDRESS into a URL for easier check in isSecure

Signed-off-by: Tibor Vass <teabee89@gmail.com>
Merge pull request #9104 from tiborvass/issecure-check-in-new-endpoint

registry: refactor registry.IsSecure calls into registry.NewEndpoint