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.

Since aae4c4f and 3a74dc8: adds strcasestr and fixes strstr.