unix: guarantee write queue cb execution order in streams

The problem is that currently the canceled write callbacks
are being called before the already written callbacks, even
though they were queued after them.
Test blows up here on Windows. I don't think we can guarantee that all REST_COUNT requests are going to be cancelled. Check if status is 0 or ECANCELLED and increase either counter. Line 57 will make sure the order is preserved. At the end, assert that both write_callbacks and write_cancelled_callbacks are > 0, and their sum is equal to FILL_COUNT + REST_COUNT.