Show URI in HTTP/HTTPSFuture exceptions

Summary:
These are difficult to debug when they stem from misconfigurations and get reported via email. Include the URI that we're trying to request in the exception.

See: https://groups.google.com/forum/?fromgroups=#!topic/phabricator-dev/e31s0kQFAeQ

Test Plan:
Tried to connect to bogus HTTP and HTTPS hosts. Verified errors include URI:

  $ ./scripts/daemon/launch_daemon.php --conduit-uri=http://xvxclnalnlskdnv.com/api/ PhutilNiceDaemon
  Bringing daemon 'PhutilNiceDaemon' online...
  PHP Fatal error:  Uncaught exception 'HTTPFutureResponseStatusTransport' with message '[Transport/4] (http://xvxclnalnlskdnv.com/api/daemon.launched) Connection could not be initiated. This usually indicates a DNS problem: verify the domain name is correct, that you can perform a DNS lookup for it from this machine. (Did you add the domain to `/etc/hosts` on some other machine, but not this one?) This might also indicate that you specified the wrong port.' in /INSECURE/devtools/libphutil/src/future/http/HTTPFuture.php:238

  $ ./scripts/daemon/launch_daemon.php --conduit-uri=https://xvxclnalnlskdnv.com/api/ PhutilNiceDaemon
  Bringing daemon 'PhutilNiceDaemon' online...
  PHP Fatal error:  Uncaught exception 'HTTPFutureResponseStatusCURL' with message '[cURL/6] (https://xvxclnalnlskdnv.com/api/daemon.launched) <CURLE_COULDNT_RESOLVE_HOST> There was an error resolving the server hostname. Check that you are connected to the internet and that DNS is correctly configured. (Did you add the domain to `/etc/hosts` on some other machine, but not this one?)' in /INSECURE/devtools/libphutil/src/future/http/HTTPSFuture.php:159

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3623
When starting the Phutil lexer in an initial state, push it onto the stack

Summary:
When permissively lexing PHP files, we put the lexer in an initial "php" state (i.e., has see '<?php') if there's no `<?` in the text. This allows us to correctly highlight PHP diffs which don't include full context.

Previously, under Pygments, we would stick "<?php" on the front and then remove it afterward, but that was messy. Now, we just start the lexer in the right state.

However, we currently set the state to the initial state, rather than pushing it onto the stack. This means a snippet like `?>` causes us to pop the state and trigger the "last state was popped" exception.

Instead push the state on to the stack, so if it is popped there's still a 'start' underneath it.

Test Plan: Added a unit test which covers this case. The test fails without this change and passes with it.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1864

Differential Revision: https://secure.phabricator.com/D3648
Write to STDERR instead of php://stderr

Summary:
It doesn't print anything under HPHP.
I've reported it but in the meantime...

Also the semantics of `file_put_contents('php://stderr')` is somewhat weird.
It suggests that the whole error channel is overwritten by the message which is not the case.

Test Plan:
  $ bin/storage --dry-run

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1261

Differential Revision: https://secure.phabricator.com/D3661
Properly escape argument parser exception

Test Plan:
  $ex = new PhutilArgumentUsageException('**test**');
  id(new PhutilArgumentParser(array('')))->printUsageException($ex);

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3664
Provide class for stopping writing to undeclared properties

Summary:
This generalizes D3607 and future D3601.

It should be trait since PHP 5.4.

Test Plan: Will use it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, btrahan

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