Don't use ctype.h routines.

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

Change-Id: I2afab254044e0d39dfa67acd840b9fe4ff1e6d08
Reviewed-on: https://code.wireshark.org/review/4756
Reviewed-by: Guy Harris <guy@alum.mit.edu>
(cherry picked from commit 762b8d78ecc001f968b3e0b5f73c22eac4c091ea)
Reviewed-on: https://code.wireshark.org/review/4757