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_LEGACY_FB to use

Tegra2/3 ICS EGL
Mali400 ICS EGL (Allwinner A10)
Mali400 Jellybean (4.1) EGL (Samsung Exynos4)

Original implementation by OndraOrg of XDA:
http://forum.xda-developers.com/showpost.php?p=34469675&postcount=19

Change-Id: I74005cf6753b3c9bfb4c1e32fb641f5167787917
surfaceflinger: odd hw rotation (90/270) patch for swapping width/height

This patch works in addition to the following commit
re-implementing ro.sf.hwrotation:
https://github.com/CyanogenMod/android_frameworks_native/commit/7d283431efffc4402cb1a6cacf5da64729c883bb

When using values of 90 and 270 for ro.sf.hwrotation the
LCD width and height also need to be swapped to display properly.

NOTE: This patch does not fix the initial startup of bootanimation

Change-Id: Iab9de66348967a378dd73a41bc96d632f750386c
Signed-off-by: Hashcode <hashcode0f@gmail.com>