uri-tester: don't use regular expressions for trivial checks

https://bugzilla.gnome.org/show_bug.cgi?id=730129
uri-tester: don't recompile the regexes every time they are used

https://bugzilla.gnome.org/show_bug.cgi?id=730129
uri-tester: don't pass strings around just to free them later

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