Merge branch 'improve-locking'

Fixes LUCY-323.

- Major rewrite of FilePurger, making it do less work.
- Eliminate global deletion lock, making PolyReader and FilePurger
  never wait for a lock.
- Redesign Lock API in preparation for native locks.
- Remove LockFactory.
- Fix locking bug with non-default merge lock timeout.
- Fix locking bug with concurrent BackgroundMergers.
- Port some tests to C.