libgui: Bring back support for mHeap-based screenshots

Older graphics libraries throw a hissy fit when trying to lock
buffers for Surface-based screenshots, on at least Tegra2/3 and
Exynos4 hardware.

This patch depends on the BOARD_EGL_NEEDS_LEGACY_FB board flag
and requires the ro.bq.gpu_to_cpu_unsupported property set to 1
in order to work

Taken from CyanogenMod, signed off by:
	Ricardo Cerqueira <cyanogenmod@cerqueira.org>

Change-Id: I9df074e936684685989fc0eb5ac317613ab4d19d