Fix uipc.c to never pass -1 to FD_ISSET.

The behavior of FD_ISSET when passed -1 is undefined.

I checked all calls of FD_SET and FD_CLR in this file, and they all
seem to be correctly guarded. None of the FD_ISSET calls were, so I
added a SAFE_FD_ISSET macro to return false when passed -1, which is
presumably what the callers intended.

This allows Bluetooth to be enabled on a device where the C library
aborts if passed any out of range fd.

Bug: 11047121
Change-Id: I261404a5a80884d5e9edab8beb3c93969113dc76
Avoid potential buffer overrun in bd2str caused by signed char

Use uint8_t to avoid sign extension as char's may be signed.
As a further safeguard, use snprintf()

Change-Id: Icdd4dba9b270bde41547677fa2f98bf215401a23

Conflicts:

	btif/src/btif_util.c