Explicitly import interfaces from TSCBasic which now allows us to
identify all the swift-tools-support-core interfaces which are in
use in SourceKit-LSP.
Replace the use of the deprecated `Lock` from swift-tools-support-core
with `NSLock`. The benefit of the deprecated interface was the
`withLock` function which is easily replicated and very unlikely to
change. By doing so we avoid the warnings about `Lock` being deprecated
when building SourceKit-LSP.
For now, we only have one concrete implementation in sourcekit-lsp
itself, but it is useful for libraries to be able to wrap their own
sourcekitd implementation for example if they have an existing external
use of sourcekitd in C code.