Fix transitions in CXQ state machine
Fix transitions in CXQ state machine

transition() did not actually check the current state, which caused IO
handlers to open the queue prematurely, leading to crashes in a
multi-process setup.

There probably still lurks a race condition without an atomic "LOCK
CMPXCHG" operation, as commented in the code.

The CXQ state machine is called from the push()/pull() methods and
could introduce branches that might have a negative impact on
performance (side traces).

eugeneia/snabb,snabbco/snabb,eugeneia/snabb,snabbco/snabb,eugeneia/snabb,snabbco/snabb,snabbco/snabb,eugeneia/snabb,snabbco/snabb,eugeneia/snabb,eugeneia/snabb,snabbco/snabb,snabbco/snabb,eugeneia/snabb,eugeneia/snabb,snabbco/snabb