Shutdown raft transport and layer first
Shutdown raft transport and layer first

The raft.Shutdown() call was deadlocking if operations were still
being applied to the log sometimes.  Change the shutdown behavior to
match how consul shuts down raft:

https://github.com/hashicorp/consul/blob/e37b5ecb692b4154927e3386e40e745436c78c93/consul/server.go#L471-L477

roobert/influxdb,josephcopenhaver/influxdb,GrimDerp/influxdb,pkittenis/influxdb,opavader/influxdb,benbjohnson/influxdb,daachi/influxdb,influxdb/influxdb,CVTJNII/influxdb-tjnii,Tony133/influxdb,mcanthony/influxdb,m4ce/influxdb,alexiri/influxdb,Ancillas/influxdb,kingland/influxdb,daachi/influxdb,bluebreezecf/influxdb,archsaber/influxdb,apigee/influxdb,alexiri/influxdb,benbjohnson/influxdb,atyenoria/influxdb,mcanthony/influxdb,atyenoria/influxdb,jgeiger/influxdb,DanielMorsing/influxdb,brunoqc/influxdb,mmaul/influxdb,arussellsaw/influxdb,pablolmiranda/influxdb,wxdublin/influxdb,cnelissen/influxdb,wxdublin/influxdb,vladlopes/influxdb,DanielMorsing/influxdb,josephcopenhaver/influxdb,paulstuart/influxdb,slavau/influxdb,otoolep/influxdb,vladlopes/influxdb,mmaul/influxdb,brunoqc/influxdb,sudabon/influxdb,jgeiger/influxdb,brunoqc/influxdb,joaopedrotaveira/influxdb,tommymei/influxdb,trigrass2/influxdb,nickrobinson/influxdb,bluebreezecf/influxdb,Venu4thFeb/influxdb,fg2it/influxdb,mre/influxdb,nickscript0/influxdb,n1tr0g/influxdb,opavader/influxdb,jipperinbham/influxdb,n1tr0g/influxdb,roobert/influxdb,luciotorre/influxdb,linearb/influxdb,pkittenis/influxdb,toorop/influxdb,pkittenis/influxdb,m4ce/influxdb,mvadu/influxdb,Mindera/influxdb,sudabon/influxdb,joaopedrotaveira/influxdb,lenko-d/influxdb,nooproblem/influxdb,n1tr0g/influxdb,josephcopenhaver/influxdb,imcom/influxdb,joaopedrotaveira/influxdb,archsaber/influxdb,mark-rushakoff/influxdb,tommymei/influxdb,samaitra/influxdb,CVTJNII/influxdb-tjnii,toorop/influxdb,daachi/influxdb,kingland/influxdb,pkittenis/influxdb,opavader/influxdb,cnelissen/influxdb,nickscript0/influxdb,Mindera/influxdb,alexiri/influxdb,jonseymour/influxdb,influxdb/influxdb,samaitra/influxdb,jonseymour/influxdb,chenziliang/influxdb,jonseymour/influxdb,nckturner/influxdb,kingland/influxdb,mcanthony/influxdb,GrimDerp/influxdb,imcom/influxdb,samaitra/influxdb,fg2it/influxdb,nckturner/influxdb,m4ce/influxdb,Venu4thFeb/influxdb,Tony133/influxdb,mark-rushakoff/influxdb,apriendeau/influxdb,Ancillas/influxdb,daachi/influxdb,mnuessler/influxdb,Venu4thFeb/influxdb,mmaul/influxdb,nickrobinson/influxdb,nooproblem/influxdb,runner-mei/influxdb,Sotfo/influxdb,Venu4thFeb/influxdb,roobert/influxdb,GrimDerp/influxdb,daachi/influxdb,tuxmonteiro/influxdb,lenko-d/influxdb,mre/influxdb,nickscript0/influxdb,slavau/influxdb,runcom/influxdb,n1tr0g/influxdb,runner-mei/influxdb,arussellsaw/influxdb,apigee/influxdb,Mindera/influxdb,GrimDerp/influxdb,runner-mei/influxdb,li-ang/influxdb,jipperinbham/influxdb,sudabon/influxdb,trigrass2/influxdb,jipperinbham/influxdb,trigrass2/influxdb,mnuessler/influxdb,pablolmiranda/influxdb,mcanthony/influxdb,Ancillas/influxdb,apigee/influxdb,alexiri/influxdb,mre/influxdb,joaopedrotaveira/influxdb,n1tr0g/influxdb,roobert/influxdb,samaitra/influxdb,benbjohnson/influxdb,nooproblem/influxdb,apigee/influxdb,arussellsaw/influxdb,sudabon/influxdb,trigrass2/influxdb,chenziliang/influxdb,atyenoria/influxdb,runner-mei/influxdb,luciotorre/influxdb,chenziliang/influxdb,luciotorre/influxdb,DanielMorsing/influxdb,mnuessler/influxdb,alexiri/influxdb,mnuessler/influxdb,nooproblem/influxdb,apriendeau/influxdb,atyenoria/influxdb,jipperinbham/influxdb,eminden/influxdb,m4ce/influxdb,arussellsaw/influxdb,otoolep/influxdb,bluebreezecf/influxdb,pkittenis/influxdb,joaopedrotaveira/influxdb,Mindera/influxdb,arussellsaw/influxdb,josephcopenhaver/influxdb,lenko-d/influxdb,runcom/influxdb,linearb/influxdb,stvnwrgs/influxdb,imcom/influxdb,Mindera/influxdb,opavader/influxdb,trigrass2/influxdb,josephcopenhaver/influxdb,pablolmiranda/influxdb,slavau/influxdb,cnelissen/influxdb,fg2it/influxdb,tuxmonteiro/influxdb,Tony133/influxdb,lgpeterson/influxdb,Tony133/influxdb,linearb/influxdb,slavau/influxdb,paulstuart/influxdb,luciotorre/influxdb,mmaul/influxdb,jipperinbham/influxdb,brunoqc/influxdb,otoolep/influxdb,influxdb/influxdb,pablolmiranda/influxdb,vladlopes/influxdb,Sotfo/influxdb,mre/influxdb,fg2it/influxdb,linearb/influxdb,imcom/influxdb,nckturner/influxdb,wxdublin/influxdb,chenziliang/influxdb,Ancillas/influxdb,mark-rushakoff/influxdb,jipperinbham/influxdb,samaitra/influxdb,lgpeterson/influxdb,nickrobinson/influxdb,cnelissen/influxdb,lenko-d/influxdb,archsaber/influxdb,CVTJNII/influxdb-tjnii,jgeiger/influxdb,sudabon/influxdb,pkittenis/influxdb,apriendeau/influxdb,CVTJNII/influxdb-tjnii,mmaul/influxdb,jgeiger/influxdb,linearb/influxdb,Sotfo/influxdb,m4ce/influxdb,toorop/influxdb,mvadu/influxdb,otoolep/influxdb,wxdublin/influxdb,jgeiger/influxdb,mark-rushakoff/influxdb,CVTJNII/influxdb-tjnii,opavader/influxdb,jonseymour/influxdb,mvadu/influxdb,paulstuart/influxdb,arussellsaw/influxdb,mark-rushakoff/influxdb,tuxmonteiro/influxdb,nickrobinson/influxdb,apigee/influxdb,eminden/influxdb,eminden/influxdb,tommymei/influxdb,tommymei/influxdb,daachi/influxdb,eminden/influxdb,toorop/influxdb,DanielMorsing/influxdb,cnelissen/influxdb,Ancillas/influxdb,mvadu/influxdb,stvnwrgs/influxdb,DanielMorsing/influxdb,tommymei/influxdb,influxdb/influxdb,otoolep/influxdb,nickscript0/influxdb,luciotorre/influxdb,atyenoria/influxdb,apriendeau/influxdb,influxdb/influxdb,nickscript0/influxdb,paulstuart/influxdb,sudabon/influxdb,tuxmonteiro/influxdb,mre/influxdb,brunoqc/influxdb,jgeiger/influxdb,lenko-d/influxdb,runcom/influxdb,influxdb/influxdb,benbjohnson/influxdb,Sotfo/influxdb,tuxmonteiro/influxdb,mvadu/influxdb,GrimDerp/influxdb,pablolmiranda/influxdb,mnuessler/influxdb,paulstuart/influxdb,Venu4thFeb/influxdb,runcom/influxdb,kingland/influxdb,otoolep/influxdb,jonseymour/influxdb,toorop/influxdb,mvadu/influxdb,Mindera/influxdb,apigee/influxdb,samaitra/influxdb,m4ce/influxdb,Sotfo/influxdb,mcanthony/influxdb,li-ang/influxdb,runcom/influxdb,lgpeterson/influxdb,stvnwrgs/influxdb,archsaber/influxdb,bluebreezecf/influxdb,kingland/influxdb,nooproblem/influxdb,influxdata/influxdb,n1tr0g/influxdb,nckturner/influxdb,mnuessler/influxdb,vladlopes/influxdb,imcom/influxdb,influxdata/influxdb,wxdublin/influxdb,mark-rushakoff/influxdb,jonseymour/influxdb,slavau/influxdb,nckturner/influxdb,roobert/influxdb,eminden/influxdb,apriendeau/influxdb,bluebreezecf/influxdb,stvnwrgs/influxdb,lgpeterson/influxdb,Tony133/influxdb,lgpeterson/influxdb,stvnwrgs/influxdb,fg2it/influxdb,CVTJNII/influxdb-tjnii,nickrobinson/influxdb