Don't use <ctype.h> macros, and eliminate an include of <ctype.h>.

This avoids locale-dependent tests.

(cherry picked from commit 25d9a7b5f1b880ab283947da28a8216dc9b7e551)

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