fsm_event type is specified when it is raised

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
nn_queue_item_isinqueue function added

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>