libc fixes and new functions

Fixes toupper, tolower and isxdigit.

Adds strcasecmp and strncasecmp.

Fixes strncmp (and, of course, strncasecmp) to correctly return zero when the n parameter is zero.