replace writer.Close() with write.close()

1.if ConnectToNSQ() return error, writer.stat should be disconnected.
2.in readLoop(), send resp to writer.dataChan before exit loop.