MINOR: global: define MODE_STOPPING

Define a new mode MODE_STOPPING. It is used to indicate that the process
is in the stopping stage and no event loop runs anymore.

(cherry picked from commit 7afa5c1843521ec3be7549592d2b38ccc9d68b73)
[ad: adjusted context: check mode not implemented in 2.4]
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
diff --git a/src/haproxy.c b/src/haproxy.c
index 0e044d8..416f28b 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -2574,6 +2574,7 @@
 
 __attribute__((noreturn)) void deinit_and_exit(int status)
 {
+	global.mode |= MODE_STOPPING;
 	deinit();
 	exit(status);
 }