registry: refactor registry.IsSecure calls into registry.NewEndpoint

Signed-off-by: Tibor Vass <teabee89@gmail.com>

Ping @dmcgowan @proppy @vbatts 
I think `newEndpoint` only takes one argument now.