introduce is_empty(State) helper in rabbit_amqqueue_process
ported from bug 23749