Don't use unix open() syscall on VABC partitions

Move logic dealing with target partitions to a function, such that it
can be overriden by subclasses.

Bug: 168554689
Test: treehugger
Change-Id: I59053a70915e51b0ab1b30922d14f211e1ba0605
diff --git a/payload_consumer/partition_writer.h b/payload_consumer/partition_writer.h
index 1c8ffbd..79ba665 100644
--- a/payload_consumer/partition_writer.h
+++ b/payload_consumer/partition_writer.h
@@ -84,6 +84,8 @@
   friend class PartitionWriterTest;
   FRIEND_TEST(PartitionWriterTest, ChooseSourceFDTest);
 
+  bool OpenSourcePartition(uint32_t source_slot, bool source_may_exist);
+
   bool OpenCurrentECCPartition();
   // For a given operation, choose the source fd to be used (raw device or error
   // correction device) based on the source operation hash.