lock event queue counters

the event queue used a auto-locked priority queue internally. we
now use a normal priority queue, and manage the locks separately.
this way we can also lock the event queue counters, like the new
sequence number counter for events.