BUILD: tree-wide: cast arguments to tolower/toupper to unsigned char

NetBSD apparently uses macros for tolower/toupper and complains about
the use of char for array subscripts. Let's properly cast all of them
to unsigned char where they are used.

This is needed to fix issue #729.
6 files changed