Adding state for being a weak pointer to BuildKey
Adding state for being a weak pointer to BuildKey

BuildKey wraps an opaque pointer but shouldn't free that if it doesn't own the pointer.
By adding a state which indicates if the pointer is weak if can decide on deinit time if the pointer should be destroyed or not.
If it got created with a pointer which was passed in, it doesn't own it, only if it was created using the llb_build_key_make function.
This change is not necessary for BuildValue because if gets only created with the raw value, no pointer.

rdar://54298130

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