add buffering to direct->evt/input

This removes most of the slowdown. Using this construct is now almost as
fast as using a dedicated reading thread.

Thanks to Matthew Flatt <https://github.com/plt/racket/issues/744>.

Signed-off-by: Jan Dvořák <mordae@anilinux.org>