Parse hosts more strictly in `PhutilURI`

Summary: See some discussion in D5726.

Test Plan: Added new, passing test.

Reviewers: wez, btrahan

Reviewed By: wez

CC: aran

Differential Revision: https://secure.phabricator.com/D5797