android: Detect /dev/tun shutdown

For reasons that are not yet clear, the OS can tear down /dev/tun on its
own and cause writes to return EBADF.  If this happens, the best we can
do is exit the mainloop and let the app try to recover.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
main: Add --timestamp option

This is useful for debugging connection timeouts and DPD/Keepalive
problems.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>