codeintel/dependencies: Simplify lockfileDependencies
Created by: tsenart
This commit simplifies the lockfileDependencies
method by leveraging a
sync.Mutex instead of a buffered channel, as well as ensuring we cancel
the existing context when returning from the method.
Test plan
Existing tests.