fix bug in writer.go

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