Allow PhutilChannels to have their write channels closed explicitly

Summary: Ref T2230. This simplifies some tests and cleans up some TODOs in the hosting stuff. See `testCloseExecWriteChannel` for an example of where we need this in practice.

Test Plan: Ran unit tests; commented out the `closeWriteChannel()` calls and got test failures instead of hangs.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2230

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