Add V4L2 Format Metadata Factory.

This factory queries the device for the properties detailing
what formats it supports. Since this may fail, Metadata/V4L2Metadata
was moved from the weird inheritance/constructor stuff it was doing
to Metadata having a better constructor and V4L2Metadata being a
factory.

BUG: 30140438
TEST: unit tests pass

Change-Id: Id4bcb27fbd8b517e3a9a8e9fb8a984af139254b3
diff --git a/modules/camera/3_4/metadata/metadata.cpp b/modules/camera/3_4/metadata/metadata.cpp
index e18a454..976a77d 100644
--- a/modules/camera/3_4/metadata/metadata.cpp
+++ b/modules/camera/3_4/metadata/metadata.cpp
@@ -23,7 +23,8 @@
 
 namespace v4l2_camera_hal {
 
-Metadata::Metadata() {
+Metadata::Metadata(PartialMetadataSet components)
+    : components_(std::move(components)) {
   HAL_LOG_ENTER();
 }
 
@@ -31,13 +32,6 @@
   HAL_LOG_ENTER();
 }
 
-void Metadata::AddComponent(
-    std::unique_ptr<PartialMetadataInterface> component) {
-  HAL_LOG_ENTER();
-
-  components_.push_back(std::move(component));
-}
-
 int Metadata::FillStaticMetadata(android::CameraMetadata* metadata) {
   HAL_LOG_ENTER();