registry: default --insecure-registry to localhost and 127.0.0.1

Note sure it's the best way to do this, since `opt.ListVar` have no defaults.

Fixes #8889 #8887

Also added some tests for `registry.IsSecure`

This PR makes the daemon treat `localhost` and `127.0.0.1` as part of the `insecureRegistries` whitelist, if the said list is empty.