Fix race on Topic.indexByUrl
Fix race on Topic.indexByUrl

applySetTopicMaxIndex() was updating the topics.indexByUrl w/o locking it.

WARNING: DATA RACE
Write by goroutine 1365:
  runtime.mapassign1()
      /usr/local/go/src/runtime/hashmap.go:376 +0x0
  github.com/influxdb/influxdb/messaging.(*Broker).applySetTopicMaxIndex()
      /home/ubuntu/.go_project/src/github.com/influxdb/influxdb/messaging/broker.go:496 +0x198
  github.com/influxdb/influxdb/messaging.(*Broker).Apply()
      /home/ubuntu/.go_project/src/github.com/influxdb/influxdb/messaging/broker.go:542 +0x33a
  github.com/influxdb/influxdb.(*Broker).Apply()
      <autogenerated>:1 +0x78
  github.com/influxdb/influxdb/messaging.(*RaftFSM).Apply()
      /home/ubuntu/.go_project/src/github.com/influxdb/influxdb/messaging/broker.go:614 +0x24f
  github.com/influxdb/influxdb/raft.(*Log).applyNextUnappliedEntry()
      /home/ubuntu/.go_project/src/github.com/influxdb/influxdb/raft/log.go:1431 +0x75c
  github.com/influxdb/influxdb/raft.(*Log).applier()
      /home/ubuntu/.go_project/src/github.com/influxdb/influxdb/raft/log.go:1369 +0x18f

Previous read by goroutine 1540:
  runtime.mapiterinit()
      /usr/local/go/src/runtime/hashmap.go:535 +0x0
  github.com/influxdb/influxdb/messaging.(*Topic).DataURLs()
      /home/ubuntu/.go_project/src/github.com/influxdb/influxdb/messaging/broker.go:681 +0x11d
  github.com/influxdb/influxdb/cmd/influxd.(*Handler).serveMetadata()
      /home/ubuntu/.go_project/src/github.com/influxdb/influxdb/cmd/influxd/handler.go:95 +0x3fd
  github.com/influxdb/influxdb/cmd/influxd.(*Handler).ServeHTTP()
      /home/ubuntu/.go_project/src/github.com/influxdb/influxdb/cmd/influxd/handler.go:45 +0x540
  net/http.serverHandler.ServeHTTP()
      /usr/local/go/src/net/http/server.go:1703 +0x1f6
  net/http.(*conn).serve()
      /usr/local/go/src/net/http/server.go:1204 +0x1087

marcosnils/influxdb,michaelsproul/influxdb,paulstuart/influxdb,mcanthony/influxdb,otoolep/influxdb,IMCG/InfluxDB,toorop/influxdb,ASAPPinc/influxdb,slavau/influxdb,wxdublin/influxdb,benbjohnson/influxdb,trigrass2/influxdb,CVTJNII/influxdb-tjnii,mre/influxdb,tjyang/influxdb,li-ang/influxdb,pablolmiranda/influxdb,jportoles/influxdb092,vladlopes/influxdb,bspline/influxdb,GrimDerp/influxdb,nickscript0/influxdb,pablolmiranda/influxdb,Tony133/influxdb,Sotfo/influxdb,luciotorre/influxdb,Yong-Lee/influxdb,lgpeterson/influxdb,kingland/influxdb,Ancillas/influxdb,brunoqc/influxdb,atyenoria/influxdb,mark-rushakoff/influxdb,imcom/influxdb,haim0n/influxdb,CrazyJvm/influxdb,GrimDerp/influxdb,jgeiger/influxdb,no2key/influxdb,endophage/influxdb,Sotfo/influxdb,ninjasphere/influxdb,Sotfo/influxdb,alexiri/influxdb,pablolmiranda/influxdb,daachi/influxdb,cannium/influxdb,nooproblem/influxdb,sudabon/influxdb,lenko-d/influxdb,li-ang/influxdb,GoIncremental/influxdb,fxstein/influxdb,wxdublin/influxdb,DanielMorsing/influxdb,opavader/influxdb,eminden/influxdb,bluebreezecf/influxdb,jgeiger/influxdb,endophage/influxdb,nickrobinson/influxdb,runcom/influxdb,mvadu/influxdb,pkittenis/influxdb,influxdb/influxdb,cnelissen/influxdb,linfangrong/influxdb,rnubel/influxdb,Yong-Lee/influxdb,josephcopenhaver/influxdb,samaitra/influxdb,ezotrank/influxdb,CrazyJvm/influxdb,atyenoria/influxdb,slavau/influxdb,apriendeau/influxdb,benbjohnson/influxdb,Ancillas/influxdb,runner-mei/influxdb,bluebreezecf/influxdb,Tony133/influxdb,marcosnils/influxdb,daachi/influxdb,Venu4thFeb/influxdb,jonseymour/influxdb,jonseymour/influxdb,n1tr0g/influxdb,evanphx/influxdb,tommymei/influxdb,lenko-d/influxdb,chenziliang/influxdb,nickrobinson/influxdb,bluebreezecf/influxdb,ASAPPinc/influxdb,mcanthony/influxdb,nckturner/influxdb,Mindera/influxdb,Tony133/influxdb,Venu4thFeb/influxdb,nooproblem/influxdb,samaitra/influxdb,ezotrank/influxdb,stvnwrgs/influxdb,dneuman64/influxdb,tuxmonteiro/influxdb,arussellsaw/influxdb,paulstuart/influxdb,Tony133/influxdb,IMCG/InfluxDB,influxdata/influxdb,archsaber/influxdb,daachi/influxdb,Ancillas/influxdb,kingland/influxdb,vladlopes/influxdb,roobert/influxdb,jgeiger/influxdb,paulstuart/influxdb,Mindera/influxdb,samaitra/influxdb,chenziliang/influxdb,linearb/influxdb,pkittenis/influxdb,endophage/influxdb,otoolep/influxdb,GrimDerp/influxdb,no2key/influxdb,mash0304/influxdb,imcom/influxdb,sudabon/influxdb,Sotfo/influxdb,apigee/influxdb,no2key/influxdb,opavader/influxdb,timraymond/influxdb,joaopedrotaveira/influxdb,linearb/influxdb,lgpeterson/influxdb,daachi/influxdb,arussellsaw/influxdb,josephcopenhaver/influxdb,mcanthony/influxdb,no2key/influxdb,ASAPPinc/influxdb,chenziliang/influxdb,ASAPPinc/influxdb,influxdb/influxdb,cnelissen/influxdb,ninjasphere/influxdb,mnuessler/influxdb,toorop/influxdb,otoolep/influxdb,nckturner/influxdb,eminden/influxdb,linfangrong/influxdb,tjyang/influxdb,eminden/influxdb,sudabon/influxdb,josephcopenhaver/influxdb,Venu4thFeb/influxdb,haim0n/influxdb,slachiewicz/influxdb,tjyang/influxdb,n1tr0g/influxdb,nckturner/influxdb,neonstalwart/influxdb,jonseymour/influxdb,roobert/influxdb,evanphx/influxdb,121watts/influxdb,CrazyJvm/influxdb,wxdublin/influxdb,runcom/influxdb,mnuessler/influxdb,lgpeterson/influxdb,ninjasphere/influxdb,jonseymour/influxdb,linearb/influxdb,samaitra/influxdb,egymgmbh/influxdb,runner-mei/influxdb,pdf/influxdb,nickrobinson/influxdb,mmaul/influxdb,Mindera/influxdb,egymgmbh/influxdb,apriendeau/influxdb,s7v7nislands/influxdb,eminden/influxdb,slachiewicz/influxdb,tuxmonteiro/influxdb,mre/influxdb,wxdublin/influxdb,nickscript0/influxdb,bluebreezecf/influxdb,sudabon/influxdb,cnelissen/influxdb,GrimDerp/influxdb,jipperinbham/influxdb,stvnwrgs/influxdb,m4ce/influxdb,Mindera/influxdb,sudabon/influxdb,mre/influxdb,DanielMorsing/influxdb,joaopedrotaveira/influxdb,IMCG/InfluxDB,tommymei/influxdb,mengjinglei/influxdb,influxdb/influxdb,trigrass2/influxdb,rnubel/influxdb,jipperinbham/influxdb,pkittenis/influxdb,m4ce/influxdb,alexiri/influxdb,jonseymour/influxdb,kingland/influxdb,fxstein/influxdb,arussellsaw/influxdb,otoolep/influxdb,Ancillas/influxdb,mvadu/influxdb,nickscript0/influxdb,mnuessler/influxdb,nickscript0/influxdb,evanphx/influxdb,GoIncremental/influxdb,fg2it/influxdb,pdf/influxdb,roobert/influxdb,samaitra/influxdb,jonseymour/influxdb,mmaul/influxdb,mmaul/influxdb,mark-rushakoff/influxdb,roobert/influxdb,slavau/influxdb,ninjasphere/influxdb,tommymei/influxdb,pdf/influxdb,luciotorre/influxdb,ninjasphere/influxdb,jipperinbham/influxdb,CVTJNII/influxdb-tjnii,fxstein/influxdb,atyenoria/influxdb,opavader/influxdb,alexiri/influxdb,lenko-d/influxdb,m4ce/influxdb,brunoqc/influxdb,Ancillas/influxdb,121watts/influxdb,neonstalwart/influxdb,mvadu/influxdb,mnuessler/influxdb,wxdublin/influxdb,mnuessler/influxdb,mmaul/influxdb,daachi/influxdb,slachiewicz/influxdb,archsaber/influxdb,apriendeau/influxdb,alexiri/influxdb,lenko-d/influxdb,bspline/influxdb,cannium/influxdb,trigrass2/influxdb,mark-rushakoff/influxdb,joaopedrotaveira/influxdb,jipperinbham/influxdb,mash0304/influxdb,apriendeau/influxdb,m4ce/influxdb,endophage/influxdb,haim0n/influxdb,mre/influxdb,CrazyJvm/influxdb,trigrass2/influxdb,DanielMorsing/influxdb,influxdb/influxdb,michaelsproul/influxdb,ezotrank/influxdb,imcom/influxdb,rnubel/influxdb,CVTJNII/influxdb-tjnii,mcanthony/influxdb,josephcopenhaver/influxdb,n1tr0g/influxdb,jgeiger/influxdb,influxdata/influxdb,dneuman64/influxdb,Mindera/influxdb,m4ce/influxdb,mash0304/influxdb,fxstein/influxdb,stvnwrgs/influxdb,arussellsaw/influxdb,fxstein/influxdb,imcom/influxdb,mengjinglei/influxdb,Yong-Lee/influxdb,slavau/influxdb,daachi/influxdb,archsaber/influxdb,tuxmonteiro/influxdb,121watts/influxdb,nickscript0/influxdb,runcom/influxdb,toorop/influxdb,tjyang/influxdb,paulstuart/influxdb,lgpeterson/influxdb,cnelissen/influxdb,egymgmbh/influxdb,slachiewicz/influxdb,nickrobinson/influxdb,pablolmiranda/influxdb,fg2it/influxdb,DanielMorsing/influxdb,samaitra/influxdb,kingland/influxdb,pkittenis/influxdb,vladlopes/influxdb,mash0304/influxdb,egymgmbh/influxdb,bluebreezecf/influxdb,121watts/influxdb,mre/influxdb,nooproblem/influxdb,GoIncremental/influxdb,dneuman64/influxdb,tuxmonteiro/influxdb,GrimDerp/influxdb,cannium/influxdb,bspline/influxdb,jportoles/influxdb092,bspline/influxdb,apigee/influxdb,chenziliang/influxdb,mmaul/influxdb,benbjohnson/influxdb,nooproblem/influxdb,pkittenis/influxdb,brunoqc/influxdb,slavau/influxdb,stvnwrgs/influxdb,GoIncremental/influxdb,bspline/influxdb,mash0304/influxdb,cnelissen/influxdb,paulstuart/influxdb,joaopedrotaveira/influxdb,dneuman64/influxdb,luciotorre/influxdb,jgeiger/influxdb,pablolmiranda/influxdb,s7v7nislands/influxdb,pdf/influxdb,influxdb/influxdb,atyenoria/influxdb,nickrobinson/influxdb,brunoqc/influxdb,apigee/influxdb,Venu4thFeb/influxdb,jipperinbham/influxdb,mark-rushakoff/influxdb,jportoles/influxdb092,neonstalwart/influxdb,mvadu/influxdb,CVTJNII/influxdb-tjnii,luciotorre/influxdb,opavader/influxdb,benbjohnson/influxdb,mcanthony/influxdb,haim0n/influxdb,mark-rushakoff/influxdb,rnubel/influxdb,dneuman64/influxdb,Yong-Lee/influxdb,atyenoria/influxdb,tuxmonteiro/influxdb,alexiri/influxdb,michaelsproul/influxdb,Sotfo/influxdb,n1tr0g/influxdb,kingland/influxdb,fg2it/influxdb,apriendeau/influxdb,slachiewicz/influxdb,otoolep/influxdb,linfangrong/influxdb,IMCG/InfluxDB,timraymond/influxdb,m4ce/influxdb,endophage/influxdb,otoolep/influxdb,neonstalwart/influxdb,michaelsproul/influxdb,joaopedrotaveira/influxdb,runcom/influxdb,opavader/influxdb,josephcopenhaver/influxdb,cannium/influxdb,ezotrank/influxdb,tommymei/influxdb,linearb/influxdb,runner-mei/influxdb,timraymond/influxdb,toorop/influxdb,IMCG/InfluxDB,mengjinglei/influxdb,GoIncremental/influxdb,timraymond/influxdb,nckturner/influxdb,DanielMorsing/influxdb,fg2it/influxdb,tommymei/influxdb,toorop/influxdb,apigee/influxdb,Venu4thFeb/influxdb,roobert/influxdb,eminden/influxdb,runner-mei/influxdb,lenko-d/influxdb,pkittenis/influxdb,fg2it/influxdb,arussellsaw/influxdb,nooproblem/influxdb,brunoqc/influxdb,imcom/influxdb,egymgmbh/influxdb,archsaber/influxdb,marcosnils/influxdb,jipperinbham/influxdb,jportoles/influxdb092,runcom/influxdb,mengjinglei/influxdb,CVTJNII/influxdb-tjnii,Mindera/influxdb,trigrass2/influxdb,s7v7nislands/influxdb,jportoles/influxdb092,Yong-Lee/influxdb,marcosnils/influxdb,marcosnils/influxdb,pdf/influxdb,jgeiger/influxdb,no2key/influxdb,ASAPPinc/influxdb,CVTJNII/influxdb-tjnii,sudabon/influxdb,s7v7nislands/influxdb,mvadu/influxdb,linearb/influxdb,mnuessler/influxdb,influxdb/influxdb,mvadu/influxdb,timraymond/influxdb,michaelsproul/influxdb,rnubel/influxdb,evanphx/influxdb,Tony133/influxdb,luciotorre/influxdb,mark-rushakoff/influxdb,apigee/influxdb,lgpeterson/influxdb,vladlopes/influxdb,apigee/influxdb,nckturner/influxdb,linfangrong/influxdb,stvnwrgs/influxdb,arussellsaw/influxdb,linfangrong/influxdb,n1tr0g/influxdb,n1tr0g/influxdb