Fix various compiler warnings throughout the code

Mostly signed/unsigned and typecasting issues

Taken from http://sourceforge.net/tracker/index.php?func=detail&aid=1811517&group_id=68956&atid=522957
diff --git a/sgsnemu/tun.c b/sgsnemu/tun.c
index 365aec0..1cc706b 100644
--- a/sgsnemu/tun.c
+++ b/sgsnemu/tun.c
@@ -243,7 +243,7 @@
   } req;
   
   struct sockaddr_nl local;
-  int addr_len;
+  socklen_t addr_len;
   int fd;
   int status;