Add PhutilLunarPhase, for computing phases of the moon

Summary:
Ref T603. This seems good enough to produce the same answer as asking a layperson "does the moon look full?".

(Enables implementation of phase-of-the-moon policy controls.)

Test Plan: Unit tests.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D7216
Remove spurious +x

Summary: `make` works fine without this unnecessary +x on the makefile.
Fix two issues with Filesystem::writeUniqueFile

Summary:
  - `fclose()` error code was not checked.
  - Writing 0 bytes would be treated as an error.

Test Plan: Unit test.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, glen

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