loghandler: Added X-Forwarded-For awareness for remote address.

I'd simplify this to `parts[0] + ":0"`.