Apexd: Move away from unique_ptr

Use StatusOr as the RAII container, and use move semantics.
This commit prepares apexd internals, mostly.

Test: atest apexservice_test
Change-Id: I55d229891e65eda2640b1cfa9b76dc7818ffb94b
diff --git a/apexd/apex_file.cpp b/apexd/apex_file.cpp
index 633cbac..50398c4 100644
--- a/apexd/apex_file.cpp
+++ b/apexd/apex_file.cpp
@@ -29,6 +29,16 @@
 namespace android {
 namespace apex {
 
+ApexFile::ApexFile(ApexFile&& other)
+    : apex_path_(other.apex_path_),
+      flattened_(other.flattened_),
+      image_offset_(other.image_offset_),
+      image_size_(other.image_size_),
+      manifest_(other.manifest_),
+      handle_(other.handle_) {
+  other.handle_ = nullptr;
+}
+
 StatusOr<std::unique_ptr<ApexFile>> ApexFile::Open(
     const std::string& apex_path) {
   std::unique_ptr<ApexFile> ret(new ApexFile(apex_path));