Split PhutilFileLock into PhutilLock and PhutilFileLock
Summary: I think I have a reasonable way to do global locks, which are better for the intended use case, but they can share some code with the file locks.
Test Plan: Ran unit tests.
Reviewers: nh, jungejason, vrana
Reviewed By: vrana
CC: aran
Maniphest Tasks: T1400
Differential Revision: https://secure.phabricator.com/D2862