IPv6 loopback ip ::1 should be detected as a valid loopback ip..

We stumbled upon this bug, when running our application test in OSX env, on which `request.remote_ip` returns `::1`.