update Helpers#encode_uri for Opal, add tests