fix retransmit deadlock

when a retransmission causes a socket to become newly writable,
set the state correctly. this prevents deadlocks where the app
was waiting for shadow to tell it that the socket could be written.

fixes #191