Force explicit '-' to create a chart interactively

Previously calling `chart` would hang until stdin was closed, and didn't
interrupt gracefully in that situation.
Factor out shutdown behavior from poll logic
Shutdown server if window closes

This is a good cleanup when the input is long-running.  Doesn't work perfectly
(for example with `chart -` the server will hang) but a good start.