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

1. close(this.exitChan) in writer.close()
2. replace Mutex with transactionStat
Merge pull request #202 from datastream/master

go-nsq: fix bug in Writer