Use NULL instead of 0.
Refactor how game events are pumped.

game_events::pump() now records the events in the event queue at
the time it is called. This isolates those events from any that
might be fired within one of the events (e.g. with [fire_event]).
For an example of what was happening, see bug #21031.

Fixes bug #21031.
Have pump() no longer pump events raised while it is running.

The main way I know of for getting into this situation is hitting
the recursion maximum within pump(), and if that happens you probably
have runaway WML. So it should be better to move on instead of
continuing to process events.
(Normally, events raised within an event handler are pumped before
that event handler exits, so would not be affected by this change.)

I think the old behavior is an artifact of the old implementation,
but I'm making this a separate commit in case removing this causes
problems (easier to diagnose, especially if I'm not the one diagnosing).
Eliminate a variable by inlining a function call.