REORG/MEDIUM: server: split server state and flags in two different variables

Till now, the server's state and flags were all saved as a single bit
field. It causes some difficulties because we'd like to have an enum
for the state and separate flags.

This commit starts by splitting them in two distinct fields. The first
one is srv->state (with its counter-part srv->prev_state) which are now
enums, but which still contain bits (SRV_STF_*).

The flags now lie in their own field (srv->flags).

The function srv_is_usable() was updated to use the enum as input, since
it already used to deal only with the state.

Note that currently, the maintenance mode is still in the state for
simplicity, but it must move as well.
diff --git a/src/backend.c b/src/backend.c
index e9043b4..3ce7415 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -100,7 +100,7 @@
 		if (!srv_is_usable(srv))
 			continue;
 
-		if (srv->state & SRV_BACKUP) {
+		if (srv->flags & SRV_F_BACKUP) {
 			if (!px->srv_bck &&
 			    !(px->options & PR_O_USE_ALL_BK))
 				px->lbprm.fbck = srv;
@@ -767,7 +767,7 @@
 
 		/* if this server remaps proxied ports, we'll use
 		 * the port the client connected to with an offset. */
-		if ((objt_server(s->target)->state & SRV_MAPPORTS) && cli_conn) {
+		if ((objt_server(s->target)->flags & SRV_F_MAPPORTS) && cli_conn) {
 			int base_port;
 
 			conn_get_to_addr(cli_conn);
@@ -1242,7 +1242,7 @@
 	while (srv) {
 		if (srv->addr.ss_family == AF_INET &&
 		    memcmp(&addr, &(srv->addr), sizeof(addr)) == 0) {
-			if ((srv->state & SRV_RUNNING) || (px->options & PR_O_PERSIST)) {
+			if ((srv->state & SRV_STF_RUNNING) || (px->options & PR_O_PERSIST)) {
 				/* we found the server and it is usable */
 				s->flags |= SN_DIRECT | SN_ASSIGNED;
 				s->target = &srv->obj_type;
@@ -1489,8 +1489,8 @@
 
 	smp->flags = SMP_F_VOL_TEST;
 	smp->type = SMP_T_BOOL;
-	if (!(srv->state & SRV_MAINTAIN) &&
-	    (!(srv->check.state & CHK_ST_CONFIGURED) || (srv->state & SRV_RUNNING)))
+	if (!(srv->state & SRV_STF_MAINTAIN) &&
+	    (!(srv->check.state & CHK_ST_CONFIGURED) || (srv->state & SRV_STF_RUNNING)))
 		smp->data.uint = 1;
 	else
 		smp->data.uint = 0;
@@ -1512,7 +1512,7 @@
 	smp->data.uint = 0;
 
 	for (iterator = args->data.prx->srv; iterator; iterator = iterator->next) {
-		if ((iterator->state & SRV_RUNNING) == 0)
+		if ((iterator->state & SRV_STF_RUNNING) == 0)
 			continue;
 
 		if (iterator->maxconn == 0 || iterator->maxqueue == 0) {