overlay: Standardize init/close of internal components

Standardize the constructor/destructor init/close of internal
components.
Also internal components are allocated dynamically, with pointers
maintained in parent. This should facilitate gathering internals
from objects into arrays.

Change-Id: I8606fa436cf03fb75e43dc0f8341a05901751a11
diff --git a/liboverlay/overlayMdp.cpp b/liboverlay/overlayMdp.cpp
index 268480d..b278ce4 100644
--- a/liboverlay/overlayMdp.cpp
+++ b/liboverlay/overlayMdp.cpp
@@ -45,7 +45,7 @@
 namespace ovutils = overlay::utils;
 namespace overlay {
 
-bool MdpCtrl::init(uint32_t dpy) {
+bool MdpCtrl::init(const int& dpy) {
     int fbnum = Overlay::getFbForDpy(dpy);
     if( fbnum < 0 ) {
         ALOGE("%s: Invalid FB for the display: %d",__FUNCTION__, dpy);
@@ -390,7 +390,7 @@
 
 
 //// MdpData ////////////
-bool MdpData::init(uint32_t dpy) {
+bool MdpData::init(const int& dpy) {
     int fbnum = Overlay::getFbForDpy(dpy);
     if( fbnum < 0 ) {
         ALOGE("%s: Invalid FB for the display: %d",__FUNCTION__, dpy);