query_classifier.cc: cleaned up and simplified skygw_get_canonical
skygw_util.cc:fixed memory allocation issue where terminating byte wasn't counted. Added some error checks.