ext/thin_parser: Use locale independent toupper()

thin fails when Accept-Language is equal to 'tr' due to the fact that
Turkish locale affects functions like toupper()/tolower() in unexpected
ways.

Problem lies in the fact that Turkish has different case mappings for
letters "I" and "i". A detailed explanation of the problem can be found
at: http://www.i18nguy.com/unicode/turkish-i18n.html

This commit defines a simple version of toupper (ascii_toupper) which
only works for ASCII characers.
Use unicode_utils for language independent downcase