Get rid of calls to ctype.h functions.

They don't handle values outside the range -1 to 127, and their behavior
is locale-dependent.  Use g_ascii_isXXX() and g_ascii_toXXX() instead of
isXXX() and toXXX().

If you're checking for printable ASCII, don't use isascii() and don't
use iscntrl(), use g_ascii_isprint().  If you're checking for graphical
ASCII, i.e. printable ASCII except for a space, use g_ascii_isgraph().

Use ws_xton() to convert a hex digit character to the corresponding
numeric value.

(cherry picked from commit 80e6f6251e96dd7b8a9ab0fdbf63b03a73ef6692)

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