hax: Add back the SURFACE_SKIP_FIRST_DEQUEUE legacy EGL workaround

Set BOARD_EGL_SKIP_FIRST_DEQUEUE to use

Change-Id: I46257a7e9e6b6e093a5cb92eaaaef4bdd0435a12
Forward-port surface dithering from CM10.2

This allows the use of 16-bit color displays without excessive color
banding;

Change-Id: Icb469b9cb4beb686516c60bb576dbd0a73f505e0
sensorservice: Fix init sequence for pre-1.1 API sensor HALs

The sensors API introduced a new flush() method that older binaries
won't have. For those, replace the firstFlush invocation with a
setDelay call since a lot of implementations interpreted that as
the initialization step.
We also don't want any kind of call to flush() to happen when it
isn't there, since it'll either hit a random OEM extension or
a memory address we really don't want to execute.

Change-Id: I26ce923fe385751fed7d1c483a53c074249f0620
Revert "SensorEventQueue: Allow setRate on sensor enable"

This reverts commit 320fd662a3cf98c920fb9b2ae05e34c7ee3e623d. It's the wrong fix for the wrong problem. The main issue on
devices like the JF is the presence of a new method (flush) in the 1.1
sensor API, which can't be invoked in older blobs and should
be addressed in the sensorservice itself.

Change-Id: I2f5fff41db7a11ed2e0f6650d1f1cecb5e2a03fb
installd: Invert the default for dexopt-on-cache

The growth of /system apps and total /data space are making this
device-breaking (insufficient space to dexopt everything to
/cache), pointless (/data has more than enough room to hold
the cache), and in some cases, both.
The default behavior is now the same as mainline Android's: dexopt
everything to /data. Set dalvik.vm.dexopt-data-only=0 to change
that and dexopt /system apps to /cache. If you do that, make sure
your /cache can accomodate double the size of the dex classes in
system, since in some extreme cases that has been observed during
dex2oat

Change-Id: I8c793784af1fa804ccf84b442613d1000c9b7ce4