Refactored dispatch loop to store input characters in a queue.

This sets things up for implementing the '!' command, which
takes arguments. Without this change, the arguments would have
gone directly to dispatch, and that would have created a mess.
learntris.l: added a little copyright notice