Fix a deadlock if the user never reads a window's event channel.

Basically, the main go routine should never block, because it always
needs to be available to handle function execution requests. Instead
of blocking when sending events, use a buffered channel and discard
events if the buffer is full.