Make remote_ip detection properly handle private IPv6 addresses

Fixes #12638.
Merge pull request #12651 from cespare/ipv6-remote-ip-fixes

Make remote_ip detection properly handle private IPv6 addresses

Conflicts:
	actionpack/CHANGELOG.md