XWIKI-10015: escape tests did not like the straight forward html-encoding

use a more painstaking aproach to make sure querystring is really url encoded
(and therefore contains no dangeling <> or ') while avoiding
to url-encode twice these values that have been already encoded properly