Make all access to Context's lock via helpers

`context._lock` should be an implementation detail with callers only concerned with acquire_lock and release_lock.

Testing Done:
https://travis-ci.org/pantsbuild/pants/builds/41820893

Bugs closed: 818

Reviewed at https://rbcommons.com/s/twitter/r/1391/