Plug memory leak with PhutilErrorTrap

Summary:
Since PhutilErrorTrap registers itself with PhutilErrorHandler, it still has a positive refcount after `unset()` and is not destroyed. Destroy it explicitly.

(I didn't test this well in the original revision. :/)

Test Plan: Ran `phd debug phabricatorbot <config> -- --trace-memory` and saw climbing memory usage before this patch. After this patch, saw steady usage.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, staticshock

Differential Revision: https://secure.phabricator.com/D6788
Provide access to CWD and Env for passthru by making it a class

Summary:
Ref T3733. Currently, `phutil_passthru()` can't take Env or CWD parameters. In T3733, it would be cleanest to be able to provide a CWD. (A similar thing came up recently with Env, although we solved that in a different way.)

This just moves `phutil_passthru()` into a class so we can specify more stuff without some sort of hacky signature.

I added a trivial "this code doesn't have any syntax errors" sort of unit test; doing more is difficult (I think we'd have to execute a wrapper subprocess and have that subprocess do the actual passthru).

Test Plan: Ran unit tests; created this revision on the new code using `arc`, which hits `phutil_passthru()` to invoke EDITOR.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3733

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