Pass a void * instead of const char *

Name is not suitable for every platform. Hence, instead of passing const char
*name, it is better to pass a void * which can be used to pass anything to the
serial_open function. For serial_posix, name is required, for serial_ftdi, int
usb_fd is required. Incorporate these as well.

Signed-off-by: Venkatesh Shukla <venkatesh.shukla.eee11@iitbhu.ac.in>
Implement exponential backoff on 0 return

ftdi_read_data returns the number of bytes read (+ve), 0 when there is no data
to read, and negative when there is an error.
Instead of infinitely waiting for the data to appear, it is better to implement
an exponential backoff which times out after MAX_BACKOFF.

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