Detect closed client socket in _changes handler

The handler for longpoll _changes wasn't detecting the write error after
a client closes its connection. Without this it'll just stay open until
there's some change to send, which could be forever. Fixed.
Also added code to log the end-of-request line if HTTP+ logging is on.
This will indicate the write error if the client closed the connection.