Automatic render shutdown

Closes #180
Maybe add a comment:

~~~rust
// wait for acknowledgement
self.swap_ack.recv_opt().map_err(|_| {
    self.should_close = true; // the channel has disconnected, so it is time to close
});
~~~