- Normalize path behaviour to always be "/" across versions
- Normalize port visibility behaviour to match input string when
appending
- restore rebar_utils function to avoid breaking random plugins that
peek into our libs for their stuff
- Support URIOpts equivalent and protocol-based overrides; the behaviour
there is not necessarily consistent across versions in terms of what
ports are returned (http_uri always returned a port but uri_string
only returns it if explicitly specified -- we choose the latter
behaviour on newer releases), but the calls work to ensure URI parsing
consistently works across versions
The latter judgement call is a bit of an odd one; for consistency we
could always mandate ports, but this would come at a performance penalty
when appending URL paths (i.e. when fetching packages).
The reason for this is that we standardize on the new uri_string
behaviour for path appending (if the port wasn't specified, we don't add
it), and with the http_uri rules, we need to do a kind of parsing round
that checks if the port was included or not to make it equivalent. This
is costly, and _not_ returning the port when it isn't specified lets us
do this transparently.
This allows to maintain backwards compat in older append functions, and
nobody aside from us currently uses the new rebar_uri module so we can
decide to introduce this potential inconsistency if we wish to.