Updated CGI utility functions to support UTF-8 characters

Specifically the escape_string() function in cgiutils.c was updated. 
In order to support this we needed to set the encoding which is set 
using setlocale(). 

Because setlocale() specifies both the language and the encoding, 
the function that reads the CGI variables now calls a function to 
parse the HTTP_ACCEPT_LANGUAGE variable and attempt to set the 
locale based on the user's preferred language and locality.

This wasn't really necessary because all we really needed was to 
set the encoding to UTF-8, but it may be useful in the future and 
is less ethnocentric than just blindly setting the locale to 
en_US.utf8. :-)