Minor error in serial_configure

Due to a minor mistake, only the first byte was being checked for
equality. Fixed it by changing position of parenthesis.

Signed-off-by: Venkatesh Shukla <venkatesh.shukla.eee11@iitbhu.ac.in>
Initialize the termios structure.

The previous commit exposed another issue. The termios structure may
contain padding bytes. Because the content of those padding bytes is
unspecified, they may contain some random data, which causes the memcmp
to fail.

Explicitly initializing the termios structure with memset, will also set
the padding bytes to zero.
Remove the extra check of the termios structure.

The extra memcmp check after the tcsetattr call is intended to verify
whether all the changes to the termios structure have been applied
correctly.

But for pty's, some of the termios settings make no sense at all, and
therefore the Linux kernel always does:

    tty->termios.c_cflag &= ~(CSIZE | PARENB);
    tty->termios.c_cflag |= (CS8 | CREAD);

Thus, instead of ignoring such nonsense termios settings, the kernel
changes the termios structure to reflect what pty's actually do. The
consequence is that these settings will not stick, and cause the memcmp
check to fail.

An example where this affects libdivecomputer, are the two backends that
require odd or even parity (e.g. vyper and iconhd). Here, the kernel
will clear the PARENB flag, and thus cause the memcmp check to fail.

Since this check appears to causes more trouble than it solves, let's
just remove it completely!
Merge branch 'termios'
Use higher resolution timestamps on Windows.

In commit 886884ab606def1183d99eca7dec8affefee635e, the custom log
function in the example applications has already been modified to use
high resolution timestamps. But I forgot about the built-in default log
function. So this is basically the same change, but now applied to the
built-in log function.
Modified to pass file descriptor instead of path

As an experiment, the file descriptor was passed on rather than
path to the tty. Refer
http://developer.android.com/reference/android/hardware/usb/UsbDeviceConnection.html#getFileDescriptor()
for documentation regarding file descriptor to be transferred.
The idea is that Java side of the project will obtain permission for
usage of USB device and pass it on to the native side. Using this
file descriptor, the libdivecomputer is expected to import dives.

Signed-off-by: Venkatesh Shukla <venkatesh.shukla.eee11@iitbhu.ac.in>
Revert to passing name rather than fd

As experiment 2 failed with the Error ENOTTY : Not a typewriter
we would revert to the original mechanism.
The reason behind this failure is explained by Jef.
The file descriptor given by android is actually the file
descriptor of the USB device not the tty built over it.
Hence it would not be possible to use libdivecomputer with this
file descriptor.
But maybe libusb can utilise this?

Signed-off-by: Venkatesh Shukla <venkatesh.shukla.eee11@iitbhu.ac.in>