Refactor ActionDispatch::RemoteIp

Refactored IP address checking in `ActionDispatch::RemoteIp` to rely on
the `IPAddr` class instead of the unwieldly regular expression to match
IP addresses. This commit keeps the same api but allows users to pass
`IPAddr` objects to `config.action_dispatch.trusted_proxies` in addition
to passing strings and regular expressions.

Example:

    # config/environments/production.rb
    config.action_dispatch.trusted_proxies = IPAddr.new('4.8.15.16')
Yes there is a specific exception we can catch in the event of a bad/malicious input. Users can sneak a netmask in, which I think is harmless for this code but I will add some code here to make sure that the there the IPAddr object created only represents a single IP.