These checks allows the emulator to abort at the moment in which two
consecutive states are going to be emitted by the channel, showing the
culpirit in the backtrace. Waiting for the check in chan_emit() hides
the source of the problem.
A priority queue (in heap.h) is used to keep the next event ready in the
emulator loop. Additionally, a list of dirty channels is keept to
limit the complexity of the propagation and emit phases.