The old behavior was only correct when building substituted types,
ie, if createTupleType() was never called with a pack expansion type.
This was the case in the runtime's MetadataLookup which applies
substitutions to an interface type to ultimately construct metadata
for a fully-concrete type, but not in the ASTDemangler, where we
actually build interface types.
Since TypeDecoder doesn't have any way to query the kind of type
it just built, let's just instead make this decision inside the
implementation of the type builder concept.
Fixes https://github.com/apple/swift/issues/67322.
When a metadata pack is heap allocated, the pointer's LSB is set.
But lldb is expecting a real pointer. So mask it off.
Companion PR has a test: https://github.com/apple/llvm-project/pull/6961
rdar://110195273