Support for proxies and load balancers

Combine both the REMOTE_ADDR header (which is the connecting device's IP address), plus the HTTP_X_FORWARDED_FOR header if present (which is set by some proxy servers and load balancers) when determining the user's IP address. This allows us to have a unique per-user view, even when behind a proxy or load balancer.