The copy constructor of CompilerInvocation performs a deep copy of the reference-counted pointers stored in its base class.
This behaviour might be surprising, since it doesn't follow the default semantics of std::shared_ptr and llvm::IntrusiveRefCntPtr.
In this patch, the copy constructor is declared private and the clone() method is introduced, making the behaviour obvious.
Depends on D100473.
WIP: Before landing this and advertising the deep copy functionality, we should clear up ownership of PreprocessorOptions::RemappedFileBuffers.