Clean up on the nn_stream state machine.

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