[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/include/common/appsession.h b/include/common/appsession.h
index e77396c..616766f 100644
--- a/include/common/appsession.h
+++ b/include/common/appsession.h
@@ -16,7 +16,7 @@
 typedef struct appsessions {
 	char *sessid;
 	char *serverid;
-	struct timeval expire;		/* next expiration time for this application session */
+	int   expire;		/* next expiration time for this application session (in tick) */
 	unsigned long int request_count;
 	struct list hash_list;
 } appsess;
@@ -38,7 +38,7 @@
 /* Callback for destroy */
 void destroy(appsess *data);
 
-void appsession_refresh(struct task *t, struct timeval *next);
+void appsession_refresh(struct task *t, int *next);
 int appsession_task_init(void);
 int appsession_init(void);
 void appsession_cleanup(void);