Inject sysfile dependency when creating BinaryStore

Make the factory take sysFile rather than raw fd. Test code would take
a FakeSysFile for testing file operations.

Change-Id: Id7a02203893936e4eddb2e73267b45343c6c6f08
Signed-off-by: Kun Yi <kunyi@google.com>
diff --git a/binarystore_mock.hpp b/binarystore_mock.hpp
index bdbb052..bf8c811 100644
--- a/binarystore_mock.hpp
+++ b/binarystore_mock.hpp
@@ -1,6 +1,7 @@
 #pragma once
 
 #include "binarystore.hpp"
+#include "sys_file.hpp"
 
 #include <gmock/gmock.h>
 
@@ -12,9 +13,9 @@
 class MockBinaryStore : public BinaryStoreInterface
 {
   public:
-    MockBinaryStore(const std::string& baseBlobId, int fd, uint32_t offset,
-                    uint32_t maxSize) :
-        real_store_(baseBlobId, fd, offset, maxSize)
+    MockBinaryStore(const std::string& baseBlobId,
+                    std::unique_ptr<SysFile> file, uint32_t maxSize) :
+        real_store_(baseBlobId, std::move(file), maxSize)
     {
         // Implemented calls in BinaryStore will be directed to the real object.
         ON_CALL(*this, getBaseBlobId)