Better signal handling

Catch signals in separate goroutine, so we can handle them even during
blocking on IO.