state_raw: fix command buffer handling

Don't block, if there are unprocessed commands in the buffer.
See state_bcm.c for reference.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Merge pull request #7 from yegorich/select-fix

state_raw: fix command buffer handling