Don't use ctype.h routines.

That avoids locale dependency and handles possibly-signed chars(which
we weren't always doing before).

Change-Id: I89e50678abb8c3e535081c92ca25bc1bab672c68
Reviewed-on: https://code.wireshark.org/review/4798
Reviewed-by: Guy Harris <guy@alum.mit.edu>