[Ninja] Properly clean up BuildContext sig thread
[Ninja] Properly clean up BuildContext sig thread

rdar://problem/55036265

apple/swift-llbuild,apple/swift-llbuild,apple/swift-llbuild,apple/swift-llbuild,apple/swift-llbuild,apple/swift-llbuild,apple/swift-llbuild