Replace FrameState.events with FrameState.afterRender.

NOTE: this is a pull request into the `gltf` branch.

Instead of deferring raising events, primitives can push functions into afterRender to defer any kind of work until after rendering.