[MAJOR] convert all expiration timers from timeval to ticks

This is the first attempt at moving all internal parts from
using struct timeval to integer ticks. Those provides simpler
and faster code due to simplified operations, and this change
also saved about 64 bytes per session.

A new header file has been added : include/common/ticks.h.

It is possible that some functions should finally not be inlined
because they're used quite a lot (eg: tick_first, tick_add_ifset
and tick_is_expired). More measurements are required in order to
decide whether this is interesting or not.

Some function and variable names are still subject to change for
a better overall logics.
diff --git a/src/senddata.c b/src/senddata.c
index e81a2de..7fb1f96 100644
--- a/src/senddata.c
+++ b/src/senddata.c
@@ -2,7 +2,7 @@
  * Helper functions to send data over a socket and buffer.
  * Should probably move somewhere else, but where ?
  *
- * Copyright 2000-2007 Willy Tarreau <w@1wt.eu>
+ * Copyright 2000-2008 Willy Tarreau <w@1wt.eu>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -28,6 +28,7 @@
 #include <common/debug.h>
 #include <common/memory.h>
 #include <common/standard.h>
+#include <common/ticks.h>
 #include <common/time.h>
 #include <common/version.h>
 
@@ -56,8 +57,7 @@
 	EV_FD_CLR(s->cli_fd, DIR_RD);
 	EV_FD_SET(s->cli_fd, DIR_WR);
 	buffer_shutr(s->req);
-	if (!tv_add_ifset(&s->rep->wex, &now, &s->rep->wto))
-		tv_eternity(&s->rep->wex);
+	s->rep->wex = tick_add_ifset(now_ms, s->rep->wto);
 	s->cli_state = CL_STSHUTR;
 	buffer_flush(s->rep);
 	if (msg && msg->len)