modify writeloop logic

1. when w.Stop() was called, set isalive false, then new w.Write() will not send msg to channel. After sleep 1 second, all old w.Write() should have been proccessed.
2. when no tcp connection to nsqd, w.Write() will not send msg to channel.