Support b'binary string' in XHPASTNode

Summary: Documented at [[ http://www.php.net/manual/en/language.types.type-juggling.php#language.types.typecasting | Type Casting ]].

Test Plan: New unit test.

Reviewers: epriestley, vinodsr

Reviewed By: epriestley

CC: Korvin, epriestley, aran, vinodsr

Differential Revision: https://secure.phabricator.com/D7662
Fix daemons erroring on already closed `STDOUT` and `STDERR`

Summary: Fixes T4177. This is the only "good" way of not erroring on these lines, because detecting truthyness doesn't always tell you everything.

Test Plan: after changing the lines, `tail`ed the log. Didn't see new errors coming in. Changed the lines back and saw the log growing quite quickly.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Maniphest Tasks: T4177

Differential Revision: https://secure.phabricator.com/D7674
Raise an exception if LDAP search fails

Summary: Currently, we assume search will always succeed if bind succeeds, but this isn't true in the wild. We don't have a root cause yet, but blunt this error into something vaguely useful rather than passing `null` to an `array` typehint and failing later and less usefully.

Test Plan: Used `bin/auth ldap`.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

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