Revert "Revert "libgui: Bring back support for mHeap-based screenshots""

This reverts commit 07d07c6eaa37a977533a43ae9c0735ae937a8514.
Revert "surfaceflinger: allow devices to enable EGL_NEEDS_FNW"

This reverts commit dfa0fb17493b9fc34a57c61a22f797090d448375.
Revert "DisplayDevice: Backwards compatibility with old EGL"

This reverts commit 27533464ccf9fec9ed1b2e61cdbc1243709f18a5.
DisplayDevice: Backwards compatibility with old EGL
From 4.1 to 4.2, the display subsystem was reworked to
use SurfaceTextureClient/BufferQueue instead of
FramebufferNativeWindow for the framebuffer itself.
Unfortunately, some legacy EGL libraries make assumptions
that any framebuffer device will be FramebufferNativeWindow.
These EGL libraries will fail when used in 4.2 as if the
framebuffer is not FramebufferNativeWindow, they will
try to dequeue more than one buffer at a time, which
will cause a hang of the graphics subsystem.
This allows use of FramebufferNativeWindow to keep
legacy EGL implementations happy.  Confirmed EGL
implementations that need this include but are
not limited to:
Set BOARD_EGL_NEEDS_FNW to use
Tegra2/3 ICS EGL
Mali400 ICS EGL (Allwinner A10)
Mali400 Jellybean (4.1) EGL (Samsung Exynos4)
Adreno Jellybean (4.1) EGL (legacy qcom devices using PMEM)
Original implementation by OndraOrg of XDA:
http://forum.xda-developers.com/showpost.php?p=34469675&postcount=19
Change-Id: If7c455035a002f272fa1a8af1cfcc60eb7ade894