Do nonblocking writes to streaming peers

This means that all incoming IO is syncronous, and that suddenly the
chunk size probably matters a lot for StreamClient bandwidth.
Wrap StreamSocket's send and recv in dedicated exception handling
Assert that has_ready_iterators() works

Nb: iterator cleanup may lead to unexpected counts
Remove unused write_object method
Fix broken import of socket errors