drm_hwcomposer: Dynamic DrmDisplayPipeline to HwcDisplay bindings

The following use scenarios are now possible:

1. When no display connected, primary HwcDisplay is created in headless
   mode.

2. When user connects first display, it binds to primary slot, replacing
   headless HwcDisplay.

3. When user connects another display it binds to the new HwcDisplay
   slot, creating new display for the framework.

4. When user disconnects first (Primary) display, drm_hwc detaches
   second display and attaches it to the Primary slot. In this case
   framework is notified as Primary display resolution updated
   (Plugged->Plugged transition). And second display is disconnected
   (Plugged->Unplugged transition).

DrmDisplayPipeline is now created on demand (after hotplug event).

HwcDisplay class is now destructed on connector unplug, which will give
us ability to destroy any resource caches (will be required for FB
caching logic).

Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
diff --git a/drm/DrmDevice.h b/drm/DrmDevice.h
index 5220760..f2530ee 100644
--- a/drm/DrmDevice.h
+++ b/drm/DrmDevice.h
@@ -37,7 +37,7 @@
   DrmDevice();
   ~DrmDevice() = default;
 
-  std::tuple<int, int> Init(const char *path, int num_displays);
+  auto Init(const char *path) -> int;
 
   auto GetFd() const {
     return fd_.Get();
@@ -56,19 +56,12 @@
     return max_resolution_;
   }
 
-  auto *GetPipelineForDisplay(int display) {
-    return pipelines_.count(display) != 0 ? pipelines_.at(display).get()
-                                          : nullptr;
-  }
-
   std::string GetName() const;
 
   auto RegisterUserPropertyBlob(void *data, size_t length) const
       -> DrmModeUserPropertyBlobUnique;
 
-  bool HandlesDisplay(int display) const;
-
-  bool HasAddFb2ModifiersSupport() const {
+  auto HasAddFb2ModifiersSupport() const {
     return HasAddFb2ModifiersSupport_;
   }
 
@@ -98,8 +91,6 @@
     return nullptr;
   }
 
-  auto GetDisplayId(DrmConnector *conn) -> int;
-
   int GetProperty(uint32_t obj_id, uint32_t obj_type, const char *prop_name,
                   DrmProperty *property) const;
 
@@ -115,8 +106,6 @@
   std::pair<uint32_t, uint32_t> min_resolution_;
   std::pair<uint32_t, uint32_t> max_resolution_;
 
-  std::map<int /*display*/, std::unique_ptr<DrmDisplayPipeline>> pipelines_;
-
   bool HasAddFb2ModifiersSupport_{};
 
   std::unique_ptr<DrmFbImporter> drm_fb_importer_;