Percent encode

The old encoding was wrong because unicode characters cannot be encoded by two hex-digits. Latin1 characters have been encoded differently. The standard is to go via a UTF8 encoded byte string.

(In query strings of the hets-api "+" may still be used instead of a blank, i.e. "?theorems=ax1+ax2".
A "+" in a theorem name should be written "XP", "X" as "XX" and " " (blank) as "XB".)

@sternk please review 
this is supposed to leave also the reserved symbols (in particalur slashes in file names) untouched for subsequent parsing.