[RFC] misc2.c -Wconversion changes

First go at helping out. Hopefully misc2.c goes away, but in the mean time I fixed up the one method in it that had -Wconversion errors, per #567.

xmallocz zeroes the string at the end, no need to double up on nulling it.

After looking, it seemed like a cnt of int was adequate, no callers used larger sizes. Still, should it be size_t?
@philix I'm just curious why you think this is better?  There's no math happening with the string, just straight comparisons, and using `char *` avoids a cast.