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_USE_MHEAP_SCREENSHOT board flag
and requires the ro.bq.gpu_to_cpu_unsupported property set to 1
in order to work.

Change-Id: I7db955e2cdd120018e349c14290e975788e70ed3
gui: allow disabling fence sync

Change-Id: I049c4a43d73fbbec482909219adc9738c97cab82
Select texture target based on pixel format

Adreno is not optimized for GL_TEXTURE_EXTERNAL_OES, making GPU
utilization (and power), high with GL_TEXTURE_EXTERNAL_OES for
RGB formats.

Change texture target from GL_EXTERNAL_TEXTURE_OES to dynamically
select between GL_EXTERNAL_TEXTURE_OES, and GL_TEXTURE_2D based
on the pixel format.

This change is done to reduce the composition time for 8x55

Change-Id: I89ab1d60b23eef55442a9fd338b2a05b3304ce61
Add GESTURE_SENSOR input source

Change-Id: If61a7e7bf2d8b2665db7ca57ed68a4462d0c1783
native: Add dock battery support

Dock battery patchset chain:
base: http://review.cyanogenmod.org/#/c/55349/
native: http://review.cyanogenmod.org/#/c/55028/
healthd: http://review.cyanogenmod.org/#/c/55029/
settings: http://review.cyanogenmod.org/#/c/55212/
tf700t: http://review.cyanogenmod.org/#/c/55030/

Video (battery styles): https://www.dropbox.com/s/a7dp3glb7lv1zcg/dock_sdcard01.mp4
Screenshots:
 * No dock: https://www.dropbox.com/s/2yvngdaqok32xiz/dock_sdcard01.png?m=
 * No charging: https://www.dropbox.com/s/ezghtgoedei17oj/dock_sdcard02.png?m=
 * Docked no charging: https://www.dropbox.com/s/7fasc05fw5ylfxi/dock_sdcard03.png?m=
 * Docked charging: https://www.dropbox.com/s/x37vrhxzd075f7p/dock_sdcard04.png?m=

Change-Id: I5f1431736cd6d6d2f6c593881323d3efb5db6b3f
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
add support for buffer_size

Change-Id: I09146cc08ea7ba51cc85a3adac40fb8cfa4ae321
BatteryService: Restore the original parcel order

Append the dock extensions to the end of the parcel to preserve
compatibility with the original parcel format.

Change-Id: Ib4fa8473fcab9882d41bd9f9617af163154290ab