(fix) LP #143352 Log the client ip in proxy case

This implements the idea of the patch from
https://bugs.launchpad.net/zope2/+bug/143352
but also honours the trusted-proxy setting.