Must keep maxtasks * 4 events in heap
Tests passing
events.State now supports callbacks for on_node_join/on_node_leave, also fixes #1728