REORG: mworker: move serializing functions to mworker.c

Move the 2 following functions to mworker.c:

void mworker_proc_list_to_env()
void mworker_env_to_proc_list()
diff --git a/src/haproxy.c b/src/haproxy.c
index f0cb2ba..8523472 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -108,6 +108,7 @@
 #include <proto/http_rules.h>
 #include <proto/listener.h>
 #include <proto/log.h>
+#include <proto/mworker.h>
 #include <proto/pattern.h>
 #include <proto/protocol.h>
 #include <proto/proto_http.h>
@@ -542,71 +543,6 @@
 	}
 }
 
-/*
- * serialize the proc list and put it in the environment
- */
-static void mworker_proc_list_to_env()
-{
-	char *msg = NULL;
-	struct mworker_proc *child;
-
-	list_for_each_entry(child, &proc_list, list) {
-		if (child->pid > -1)
-			memprintf(&msg, "%s|type=%c;fd=%d;pid=%d;rpid=%d;reloads=%d;timestamp=%d", msg ? msg : "", child->type, child->ipc_fd[0], child->pid, child->relative_pid, child->reloads, child->timestamp);
-	}
-	if (msg)
-		setenv("HAPROXY_PROCESSES", msg, 1);
-}
-
-/*
- * unserialize the proc list from the environment
- */
-static void mworker_env_to_proc_list()
-{
-	char *msg, *token = NULL, *s1;
-
-	msg = getenv("HAPROXY_PROCESSES");
-	if (!msg)
-		return;
-
-	while ((token = strtok_r(msg, "|", &s1))) {
-		struct mworker_proc *child;
-		char *subtoken = NULL;
-		char *s2;
-
-		msg = NULL;
-
-		child = calloc(1, sizeof(*child));
-
-		while ((subtoken = strtok_r(token, ";", &s2))) {
-
-			token = NULL;
-
-			if (strncmp(subtoken, "type=", 5) == 0) {
-				child->type = *(subtoken+5);
-				if (child->type == 'm') /* we are in the master, assign it */
-					proc_self = child;
-			} else if (strncmp(subtoken, "fd=", 3) == 0) {
-				child->ipc_fd[0] = atoi(subtoken+3);
-			} else if (strncmp(subtoken, "pid=", 4) == 0) {
-				child->pid = atoi(subtoken+4);
-			} else if (strncmp(subtoken, "rpid=", 5) == 0) {
-				child->relative_pid = atoi(subtoken+5);
-			} else if (strncmp(subtoken, "reloads=", 8) == 0) {
-				/* we reloaded this process once more */
-				child->reloads = atoi(subtoken+8) + 1;
-			} else if (strncmp(subtoken, "timestamp=", 10) == 0) {
-				child->timestamp = atoi(subtoken+10);
-			}
-		}
-		if (child->pid)
-			LIST_ADDQ(&proc_list, &child->list);
-		else
-			free(child);
-	}
-
-	unsetenv("HAPROXY_PROCESSES");
-}
 
 /*
  * Upon a reload, the master worker needs to close all listeners FDs but the mworker_pipe