Use kernel reception time on ICMP packets to compute rtt.

This commit uses the SO_TIMESTAMP feature of setsockopt to fetch
kernel reception time of ICMP packets. This avoids invalid
computations of rtt on machines with heavy load and/or heavy
network traffic.
Don't mix variable declarations and code

We still support pre-C99 compilers.
check_icmp: Fix a few type errors