Fix for compatibility with LLVM trunk changes using unique_ptr.
Also avoid gratuitous copy of EngineBuilder object.
Merge pull request #8060 from ArchRobison/adr/llvm36

Fix for compatibility with LLVM trunk changes that use unique_ptr<Module>