fixed bug89 and added tests: writeBuffer not flushed until nextTick'

it looks like on the next pollrequest by the client, writeBuffer gets cleared, so I also put a change there (Socket.flush())