Add Fragmenter.onExit.

This is useful to keep track of the current level.