util::percentEncodeMini: Fix regression bug removed unsignedness

srange-based for around std::string is convenient but several
functions depend unsigned char for correctness and readability.