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). This allows us to have a unique per-user view, even when behind a proxy or load balancer.
Made changes requested by yellis for readability and code cleanliness.
Merge pull request #66 from spudstuff/master

Support for proxies and load balancers