CGDebugInfo: Use DIBuilder API for self-referencing DICompositeTypes

Use new `DIBuilder` API from LLVM r224482 to mutate `DICompositeType`s,
rather than changing them directly.  This allows `DIBuilder` to track
otherwise orphaned cycles when `CollectContainingType()` creates a
self-reference.

Fixes PR21941.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224483 91177308-0d34-0410-b5e6-96231b3b80d8