Use the originating IP address for forwarded connections

In a proxied web service environment (e.g. with front-end caches, etc), the `REMOTE_ADDR` value often refers to an internal address. A very common approach is for front-end proxies to add an additional header on forwarded requests (Forwarded-For: [original-IP]). This patch allows PHP to use that if present.