make things properly executable
report resize events
handle terminal resizing

(the default curses signal handler does _everything_ we want except cause
the event handler to to fire, and seems difficult to simulate, so...)

fixes #12