web/uri: reimplement for rfc 3986, add tests