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

This avoids locale-dependent tests.

Change-Id: I709ff6b1a837fb0390b29f911d3b9ef1015a2d1e
Reviewed-on: https://code.wireshark.org/review/4758
Reviewed-by: Guy Harris <guy@alum.mit.edu>
(cherry picked from commit 25d9a7b5f1b880ab283947da28a8216dc9b7e551)
Reviewed-on: https://code.wireshark.org/review/4759