Store remote address at start of request for logger

This makes logger store the remote address on the request at the beginning of the request so when the requests ends, it still has the IP address to log even if the socket is already closed.

Fix #811