equalising devel and 3.4 in agency/cluster (#7755)
equalising devel and 3.4 in agency/cluster (#7755)

* equalising devel and 3.4 in agency/cluster
* need to move code higher up
* Correct two error codes (shutting down).

fceller/arangodb,wiltonlazary/arangodb,graetzer/arangodb,Simran-B/arangodb,wiltonlazary/arangodb,Simran-B/arangodb,wiltonlazary/arangodb,fceller/arangodb,arangodb/arangodb,fceller/arangodb,wiltonlazary/arangodb,arangodb/arangodb,Simran-B/arangodb,graetzer/arangodb,wiltonlazary/arangodb,wiltonlazary/arangodb,graetzer/arangodb,fceller/arangodb,Simran-B/arangodb,arangodb/arangodb,wiltonlazary/arangodb,arangodb/arangodb,graetzer/arangodb,graetzer/arangodb,graetzer/arangodb,arangodb/arangodb,Simran-B/arangodb,Simran-B/arangodb,graetzer/arangodb,wiltonlazary/arangodb,Simran-B/arangodb,Simran-B/arangodb,fceller/arangodb,graetzer/arangodb,graetzer/arangodb,Simran-B/arangodb,fceller/arangodb,arangodb/arangodb,graetzer/arangodb,fceller/arangodb,Simran-B/arangodb,arangodb/arangodb,fceller/arangodb,fceller/arangodb,graetzer/arangodb,graetzer/arangodb,graetzer/arangodb,fceller/arangodb,arangodb/arangodb,graetzer/arangodb