CURL::Encode: don't use locale-dependent isalnum, refactoring, add comments