Encode and decode URI strings as defined by RFC 3986