REORG: include: move time.h from common/ to haproxy/

This one is included almost everywhere and used to rely on a few other
.h that are not needed (unistd, stdlib, standard.h). It could possibly
make sense to split it into multiple parts to distinguish operations
performed on timers and the internal time accounting, but at this point
it does not appear much important.
diff --git a/include/common/time.h b/include/haproxy/time.h
similarity index 98%
rename from include/common/time.h
rename to include/haproxy/time.h
index d6863d4..4f1dc85 100644
--- a/include/common/time.h
+++ b/include/haproxy/time.h
@@ -1,8 +1,8 @@
 /*
- * include/common/time.h
+ * include/haproxy/time.h
  * Time calculation functions and macros.
  *
- * Copyright (C) 2000-2011 Willy Tarreau - w@1wt.eu
+ * Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -19,15 +19,13 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef _COMMON_TIME_H
-#define _COMMON_TIME_H
+#ifndef _HAPROXY_TIME_H
+#define _HAPROXY_TIME_H
 
-#include <stdlib.h>
-#include <unistd.h>
 #include <sys/time.h>
+#include <time.h>
 #include <haproxy/api.h>
 #include <haproxy/thread.h>
-#include <common/standard.h>
 
 /* eternity when exprimed in timeval */
 #ifndef TV_ETERNITY
@@ -82,16 +80,6 @@
  */
 int tv_ms_cmp2(const struct timeval *tv1, const struct timeval *tv2);
 
-/**** general purpose functions and macros *******************************/
-
-
-/* tv_now: sets <tv> to the current time */
-static inline struct timeval *tv_now(struct timeval *tv)
-{
-	gettimeofday(tv, NULL);
-	return tv;
-}
-
 /* tv_udpate_date: sets <date> to system time, and sets <now> to something as
  * close as possible to real time, following a monotonic function. The main
  * principle consists in detecting backwards and forwards time jumps and adjust
@@ -104,6 +92,16 @@
 
 char *timeofday_as_iso_us(int pad);
 
+/**** general purpose functions and macros *******************************/
+
+
+/* tv_now: sets <tv> to the current time */
+static inline struct timeval *tv_now(struct timeval *tv)
+{
+	gettimeofday(tv, NULL);
+	return tv;
+}
+
 /*
  * sets a struct timeval to its highest value so that it can never happen
  * note that only tv_usec is necessary to detect it since a tv_usec > 999999
@@ -602,7 +600,7 @@
 	ti->prev_mono_time = now_mono_time();
 }
 
-#endif /* _COMMON_TIME_H */
+#endif /* _HAPROXY_TIME_H */
 
 /*
  * Local variables:
diff --git a/include/proto/activity.h b/include/proto/activity.h
index 9d5044a..9ca9a42 100644
--- a/include/proto/activity.h
+++ b/include/proto/activity.h
@@ -24,7 +24,7 @@
 
 #include <haproxy/atomic.h>
 #include <haproxy/api.h>
-#include <common/time.h>
+#include <haproxy/time.h>
 #include <types/activity.h>
 #include <proto/freq_ctr.h>
 
diff --git a/include/proto/backend.h b/include/proto/backend.h
index 5160492..f702be9 100644
--- a/include/proto/backend.h
+++ b/include/proto/backend.h
@@ -23,7 +23,7 @@
 #define _PROTO_BACKEND_H
 
 #include <haproxy/api.h>
-#include <common/time.h>
+#include <haproxy/time.h>
 
 #include <types/backend.h>
 #include <types/proxy.h>
diff --git a/include/proto/channel.h b/include/proto/channel.h
index 16954ba..eaaa36b 100644
--- a/include/proto/channel.h
+++ b/include/proto/channel.h
@@ -31,7 +31,7 @@
 #include <common/chunk.h>
 #include <common/htx.h>
 #include <common/ticks.h>
-#include <common/time.h>
+#include <haproxy/time.h>
 
 #include <types/channel.h>
 #include <types/global.h>
diff --git a/include/proto/fd.h b/include/proto/fd.h
index 9426e14..f882b54 100644
--- a/include/proto/fd.h
+++ b/include/proto/fd.h
@@ -29,7 +29,7 @@
 
 #include <haproxy/api.h>
 #include <common/ticks.h>
-#include <common/time.h>
+#include <haproxy/time.h>
 #include <types/fd.h>
 #include <proto/activity.h>
 
diff --git a/include/proto/freq_ctr.h b/include/proto/freq_ctr.h
index 80529bf..896a469 100644
--- a/include/proto/freq_ctr.h
+++ b/include/proto/freq_ctr.h
@@ -25,7 +25,7 @@
 #include <haproxy/atomic.h>
 #include <haproxy/api.h>
 #include <common/standard.h>
-#include <common/time.h>
+#include <haproxy/time.h>
 #include <types/freq_ctr.h>
 
 
diff --git a/include/proto/peers.h b/include/proto/peers.h
index fbe6cf6..02fc67d 100644
--- a/include/proto/peers.h
+++ b/include/proto/peers.h
@@ -24,7 +24,7 @@
 
 #include <haproxy/api.h>
 #include <common/ticks.h>
-#include <common/time.h>
+#include <haproxy/time.h>
 #include <proto/connection.h>
 #include <types/stream.h>
 #include <types/peers.h>
diff --git a/include/proto/proxy.h b/include/proto/proxy.h
index 630a011..066e807 100644
--- a/include/proto/proxy.h
+++ b/include/proto/proxy.h
@@ -24,7 +24,7 @@
 
 #include <haproxy/api.h>
 #include <common/ticks.h>
-#include <common/time.h>
+#include <haproxy/time.h>
 #include <types/applet.h>
 #include <types/global.h>
 #include <types/proxy.h>
diff --git a/include/proto/server.h b/include/proto/server.h
index e184310..d158089 100644
--- a/include/proto/server.h
+++ b/include/proto/server.h
@@ -25,7 +25,7 @@
 #include <unistd.h>
 
 #include <haproxy/api.h>
-#include <common/time.h>
+#include <haproxy/time.h>
 #include <types/applet.h>
 #include <types/dns.h>
 #include <types/proxy.h>
diff --git a/include/proto/stick_table.h b/include/proto/stick_table.h
index 986c775..dcc2954 100644
--- a/include/proto/stick_table.h
+++ b/include/proto/stick_table.h
@@ -25,7 +25,7 @@
 
 #include <haproxy/errors.h>
 #include <common/ticks.h>
-#include <common/time.h>
+#include <haproxy/time.h>
 #include <types/stick_table.h>
 #include <types/dict.h>