Correctly error callbacks on asyncore reactor

This was broken by this commit: 993b5752d17e6552249bac9447ee30fd9e1d8d9d
Break from handle_write() if nothing was sent

asyncore will return 0 if the socket raised EWOULDBLOCK on the send()
call
Add asyncore unit test