BUILD: general: always pass unsigned chars to is* functions

The isalnum(), isalpha(), isdigit() etc functions from ctype.h are
supposed to take an int in argument which must either reflect an
unsigned char or EOF. In practice on some platforms they're implemented
as macros referencing an array, and when passed a char, they either cause
a warning "array subscript has type 'char'" when lucky, or cause random
segfaults when unlucky. It's quite unconvenient by the way since none of
them may return true for negative values. The recent introduction of
cygwin to the list of regularly tested build platforms revealed a lot
of breakage there due to the same issues again.

So this patch addresses the problem all over the code at once. It adds
unsigned char casts to every valid use case, and also drops the unneeded
double cast to int that was sometimes added on top of it.

It may be backported by dropping irrelevant changes if that helps better
support uncommon platforms. It's unlikely to fix bugs on platforms which
would already not emit any warning though.
diff --git a/src/cfgparse.c b/src/cfgparse.c
index 68cb0e9..cd39904 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -374,7 +374,7 @@
 		for (p = arg; *p; p++) {
 			if (*p == '-' && !dash)
 				dash = p;
-			else if (!isdigit((int)*p)) {
+			else if (!isdigit((unsigned char)*p)) {
 				memprintf(err, "'%s' is not a valid number/range.", arg);
 				return -1;
 			}
@@ -420,7 +420,7 @@
 		char        *dash;
 		unsigned int low, high;
 
-		if (!isdigit((int)*args[cur_arg])) {
+		if (!isdigit((unsigned char)*args[cur_arg])) {
 			memprintf(err, "'%s' is not a CPU range.\n", args[cur_arg]);
 			return -1;
 		}
@@ -2035,13 +2035,13 @@
 					braces = 1;
 				}
 
-				if (!isalpha((int)(unsigned char)*var_beg) && *var_beg != '_') {
+				if (!isalpha((unsigned char)*var_beg) && *var_beg != '_') {
 					ha_alert("parsing [%s:%d] : Variable expansion: Unrecognized character '%c' in variable name.\n", file, linenum, *var_beg);
 					err_code |= ERR_ALERT | ERR_FATAL;
 					goto next_line; /* skip current line */
 				}
 
-				while (isalnum((int)(unsigned char)*var_end) || *var_end == '_')
+				while (isalnum((unsigned char)*var_end) || *var_end == '_')
 					var_end++;
 
 				save_char = *var_end;