[MAJOR] replaced all timeouts with struct timeval

The timeout functions were difficult to manipulate because they were
rounding results to the millisecond. Thus, it was difficult to compare
and to check what expired and what did not. Also, the comparison
functions were heavy with multiplies and divides by 1000. Now, all
timeouts are stored in timevals, reducing the number of operations
for updates and leading to cleaner and more efficient code.
diff --git a/include/common/appsession.h b/include/common/appsession.h
index eb9ba2d..8fa681c 100644
--- a/include/common/appsession.h
+++ b/include/common/appsession.h
@@ -44,7 +44,7 @@
 static void print_table(const CHTbl *htbl);
 #endif
 
-int appsession_refresh(struct task *t);
+void appsession_refresh(struct task *t, struct timeval *next);
 int appsession_task_init(void);
 int appsession_init(void);
 void appsession_cleanup(void);