[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/src/ev_poll.c b/src/ev_poll.c
index c48f502..3c97707 100644
--- a/src/ev_poll.c
+++ b/src/ev_poll.c
@@ -81,10 +81,11 @@
 /*
  * Poll() poller
  */
-REGPRM2 static void _do_poll(struct poller *p, int wait_time)
+REGPRM2 static void _do_poll(struct poller *p, struct timeval *exp)
 {
 	int status;
 	int fd, nbfd;
+	int wait_time;
 
 	int fds, count;
 	int sr, sw;
@@ -123,6 +124,11 @@
 	}
       
 	/* now let's wait for events */
+	if (tv_isset(exp))
+		wait_time = tv_ms_remain(&now, exp);
+	else
+		wait_time = -1;
+
 	status = poll(poll_events, nbfd, wait_time);
 	tv_now(&now);