segregated pyglet.media.dispatch_events() into separate try/catch

This was causing erratic keypress behavior with pyglet 1.2alpha1, since `dispatch_events()` is no longer part of `pyglet.media`.