Make DiagnosticEngine thread safe (#243)
Make DiagnosticEngine thread safe (#243)

This allows consumers to emit diagnostics from multiple threads.

Primarily motivated by https://github.com/apple/swift-format/pull/117
apple/swift-syntax,apple/swift-syntax,apple/swift-syntax