hwc: external: Cleanup overlay objects on external disconnect.

Cleanup overlay objects and close fds when external is disconnected.  Without
this, the external does not come on when cable connected-disconnected multiple
times when device is in suspended state.

Bug: 7150885 (part of the fix)
Bug: 7295979
Bug: 7150885 (partial)
Change-Id: I1ae2ce7220b9928dde332ce3644dbe671d25c7e6
Signed-off-by: Iliyan Malchev <malchev@google.com>
diff --git a/libexternal/external.cpp b/libexternal/external.cpp
index c4f9aeb..d6da7aa 100644
--- a/libexternal/external.cpp
+++ b/libexternal/external.cpp
@@ -415,6 +415,9 @@
 
         //TODO ideally should be done on "connected" not "online"
         ctx->proc->hotplug(ctx->proc, HWC_DISPLAY_EXTERNAL, connected);
+
+        if(connected == false)
+            ctx->priv_proc.onExtDisconnect(ctx->priv_proc);
     }
     return;
 }