Better logging and handling of dead connections

Implemented some basic structured loging with logrus.

Add a fixed deadline check on reading from the upstream clients.