Wake up threads instead of REFRESH_SUBINTERVAL sleep increments.

Instead of sleeping in increments of `REFRESH_SUBINTERVAL` (so program
can exit in a reasonable amount of time), wake up sleeping threads on
quit, deprecating `REFRESH_SUBINTERVAL` entirely. Change `App#do_command`
to call `App#stop` instead of altering `@running` itself. After setting
`@running` status in `App#stop`, wake up any sleeping threads so they
can check whether they should be running.

This results in immediate exit on quit.

Also don't explicitly `require thread`, as this isn't necessary for Ruby
1.9 onwards.