Fix requestedIP for frontend proxies and IP validation

This allows administrators to force the header X-Real-Ip to override any ip/ipv4 parameter that is provided by the client.

If none of the three options are set it will use the remote address IP.

This should be configurable to ignore the ip/ipv4 parameter in a configuration option which should possible be raised as an issue as it allows bad peers to insert garbage peers.

A different option must exist so that proxies infront of Chihaya can set this header and be trusted as providing valid information. Else Chihaya will see the remoteAddr as 'localhost'.

Finally this commit attempts to validate the address to see if it is in any way valid and if not returns an error.