DIBuilder: retain a type when created with a unique identifier.

createClassType, createStructType, createUnionType, createEnumerationType,
and createForwardDecl will retain a type when created with a unique identifier,
to make sure they are treated as used even when all uses are replaced with
the identifiers.

Use TrackingVH<MDNode> instead of MDNode in AllRetainTypes, since the created
node can later be updated.

The change will be tested when clients of DIBuilder start to pass in non-empty
unique identifier.