[ORC] Thread Error/Expected through the RPC library.

This replaces use of std::error_code and ErrorOr in the ORC RPC support library
with Error and Expected. This required updating the OrcRemoteTarget API, Client,
and server code, as well as updating the Orc C API.

This patch also fixes several instances where Errors were dropped.

llvm-svn: 267457
diff --git a/llvm/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp b/llvm/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp
index a27e649..fedf163 100644
--- a/llvm/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp
@@ -25,12 +25,12 @@
 
 class DummyStubsManager : public orc::IndirectStubsManager {
 public:
-  std::error_code createStub(StringRef StubName, TargetAddress InitAddr,
+  Error createStub(StringRef StubName, TargetAddress InitAddr,
                              JITSymbolFlags Flags) override {
     llvm_unreachable("Not implemented");
   }
 
-  std::error_code createStubs(const StubInitsMap &StubInits) override {
+  Error createStubs(const StubInitsMap &StubInits) override {
     llvm_unreachable("Not implemented");
   }
 
@@ -42,7 +42,7 @@
     llvm_unreachable("Not implemented");
   }
 
-  std::error_code updatePointer(StringRef Name,
+  Error updatePointer(StringRef Name,
                                 TargetAddress NewAddr) override {
     llvm_unreachable("Not implemented");
   }