inert_drv: fix sign conversion in message buf

Adding a file descriptor over 127 spuriously returned {error, ebadfd}:

2> inert:fdset(R, 128).
{error,ebadfd}
3> inert:fdset(R, 127).
ok
4>
=ERROR REPORT==== 29-Sep-2013::11:25:14 ===
Bad input fd in erts_poll()! fd=11, port=#Port<0.928>, driver=inert_drv, name=inert_drv

Cast the char buf to unsigned. (fd 128 really should return ebadfd, since
it doesn't exist.)
inert_drv: test the fd is valid

Check the file descriptor is valid before adding it to driver_select.
The check uses fcntl(2) as suggested here:

http://stackoverflow.com/questions/12340695/how-to-check-if-a-given-file-descriptor-stored-in-a-variable-is-still-valid

Unfortunately, Windows does not have fcntl(2) (and getrlimit/setrlimit,
but those aren't really needed). Otherwise, inert should work on
Windows.