ENH: Add keyboard input function

Adds a function to wait for and get keyboard input. I have in mind specifically use cases like in MEG where the experiment runner wants to do:

```
bi = get_keyboard_input('Enter block number (0): ', 0, int)
```

Also fixes a minor problem with the system beep (workaround for silly Pyglet bug). Ready for review, @drammock @rkmaddox you should probably both have a look before we merge.