Change game_events::manager::iteration to not store a pointer.

Also makes the API more like an iterator's.
Allow an event handler to be destroyed just before it handles an event.

This is to support some future commits.
I've included comments to point out where pointers might become invalid
through non-obvious means.
Implementation of a "smart" linked list.

With a standard linked list, iterators are never invalidated unless
they point to an element that was erased (or the list is destroyed).
This implementation takes that one step further and never invalidates
iterators (unless the list is destroyed). From the perspective of the
list, erased elements no longer exist, but an iterator that still
points to an erased element can be dereferenced, incremented, and
decremented.

I was having trouble implementing this based on STL and Boost, so
I went ahead and coded this from scratch. The standard list interface
is implemented, aside from assignment (since I could not reconcile
assignment with the goal of not invalidating iterators).
Implementation of a list of event handlers.

This is actually a list of weak pointers that will be cleared of
expired entries as they are encountered. (So some garbage may
accumulate, but only to a point as it will be cleared the next
time the list is traversed.)
Index events by name.

This commit causes the index to be created. The next commit will
make use of the index.
Optimizing game event firing.

This uses the indexing of handlers by name to reduce the number of
event handlers that are checked when an event is fired. There is
extra overhead to independently track handlers whose names contain
variables, but in more common cases, there should be an improvement,
particularly when many events fire in sequence, such as the enter/
exit_hex events.
Speed the lookup of a game event handler by ID.
Merge event_handler::set_index() into the constructor.