Fix writable stream bug allowing concurrent writes.

If you wrote to the stream twice in rapid succession, the second time before the first write completes, then the second write did not correctly check to see if there was a write ongoing. Thus the stream would never stop being in the "writable" state, and would execute the body of the write function a second time before the first call called its `done()`.