append_form_encoded: sync urlencode with php RFC1738 implementation.

From php_url_encode:
/* Allow only alphanumeric chars and '_', '-', '.'; escape the rest */

https://bugzilla.gnome.org/show_bug.cgi?id=708621