Remove pitfall code in URI reconstruction; fix userinfo handling.

* newURI was always getting overwritten under normal circumstances
  (any time there was a / or ? or similar) so isURIEncoded is not
  necessary. Use of getQuery is dangerous, but the value was being
  thrown away. This commit helps ensure it will not be used in the
  future.
* getUserInfo is replaced with getRawUserInfo to prevent premature
  decoding of separators such as ":". This should be the only behavioral
  change.

Regression test added for the latter. Characterization test added for missing path handling (behavior not changed by commit.)