When there is only one translation variant, always select it

Summary:
Some translation parameters (like HTML strings) don't have variants.

Some languages don't have variants for certain parameters (like English for the sex of a person).

In these cases, don't require translations to provide variants.

Test Plan: Added and ran unit test.

Reviewers: chad, vrana

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D4985
Fix lock tests under Ubuntu/dash

Summary:
On Ubuntu, the default `sh` is `dash`, which (unlike bash) remains around in the process tree when you run shell commands (see the dozen similar bugs this has caused).

During these tests, we spawn and then kill subprocesses fairly aggressively. With `dash`, the subshell eats the SIGKILL and the grandchild process is left hanging around, holding the lock.

Instead, use `exec` to vanish the intermediate shell process so we can SIGKILL the lock holder directly.

Fixes T2560.

Test Plan:
```
ubuntu@ip-10-170-222-96:/core/libphutil$ uname -a
Linux ip-10-170-222-96 3.0.0-16-virtual #29-Ubuntu SMP Tue Feb 14 13:27:41 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@ip-10-170-222-96:/core/libphutil$ ../arcanist/bin/arc unit src/filesystem/__tests__/PhutilFileLockTestCase.php
   PASS   <1ms★  testLogWriteFailure
   PASS  120ms   testManyWriters
   PASS    5ms★  testLogging
   PASS  146ms   testLockHolding
   PASS    2ms★  testIsLocked
   PASS   <1ms★  testExcessiveUnlock
   PASS  147ms   testUnlockAll
   PASS   <1ms★  testRelock
   PASS   90ms   testLockTesting
   PASS  119ms   testInProcessLocking
   PASS  106ms   testInProcessHolding
```

Reviewers: Afaque_Hussain, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2560

Differential Revision: https://secure.phabricator.com/D5008
Apply lint rules to libphutil

Summary: See D5002. Same for libphutil.

Test Plan: `arc unit --everything`

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5004
Asserting that data to be written is string like

Summary: Asserting that data to be written is string like.

Test Plan: Passing non string like data to the Filesystem::writefile() function to see if the appropriate error message is displayed

Reviewers: epriestley

CC: aran, Korvin

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