* Assert index matches any time a node is accessed by index, subsuming
the assertion from #2139.
* Ensure all removed nodes are invalidated, so double-removes will
trigger assertion failure. Added a test for this.
This prevents nsock from iterating over the whole list of events at
each runloop, thus improving performance.
It made it necessary to have pointers from the msevents to the event
lists they belong to. The patch therefore also changes gh_list from
autonomous containers to embedded structures.
Added unit tests accordingly and cosmetic changes to make things look
more consistent.