liboverlay: Rotator-assisted video downscale.

Engage the rotator to assist MDP in performing video downscale. This
saves bandwidth and avoids causing the driver to make too many panel
mode switches between BLT (writeback) and non-BLT (direct) modes.

This optimization can be enabled using ROT_DOWNSCALE_ENABLED flag.

Change-Id: Ic0779402dcb1e3617f868724c44e62887a0434f1
libhwcomposer: Enable rotator downscale for pip.

Enable rotator downscale for pip window.

Change-Id: Ia06b8dd4042084a67a007a055c6fb32c201d23a4
liboverlay: ROT_DOWNSCALE is not supported in all MDP versions.

Change-Id: I4f235964b2247b5136c640165f1ad3e555731f8c
CRs-Fixed: 411509
liboverlay: ensure open fd's are always closed

Ensures that reset and  mFd.Close is always called when MdpCtrl
and MdpData are closed down.

CRs-fixed: 397498
Change-Id: I775ba7cfe45c67e6acf874e3f4e8b4fa6fbe33b8
display: fix display for msm7x30

implement ANCIENT_GL ifdef to revert commit 2d69977f816031dacbf4378b2e54a3b6c4209d9a witout breaking other devices

Change-Id: I6aad90a7abae75cd780e4532eb53882ddd5fd0d3
liboverlay: close all the opened pipes after framework reboot.

Add initOverlay() function to close all the opened pipes when
Surfaceflinger process gets killed.

Change-Id: I9c65a61c81f9c81198f1076d6cbd27933b164c05
CRs-Fixed: 412954
(cherry picked from commit c20f1810dd07c9097ba4c066ec86a677399ae47f)