surfaceflinger: Reimplement hwrotation

Change-Id: Ia26bb36b5b6de132af49c272c4472ad2703afbda
Sensor: Add RotationVectorSensor2

(ported from 4.1)

Some ICS apps (namely, Google Maps) expects a rotation vector to be
available. Newer devices, this is provided by either Android's
sensor fusion (requires Gyro) or by hardware sensor fusion (MPL).

Older devices will lack this virtual sensor and compass in Google
Maps will not work. To fix this, we can provide our own rotation
vector sensor by converting the values from the orientation sensor.
(They are basically the same information in different formats.)

Thanks to Unhelpful for the help with related math.

Change-Id: I39489b3a5ce7c7d890768614357f32cc491bd6d9

Conflicts:
	services/sensorservice/SensorService.cpp
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>
Add setOrientation back

	this is needed for some tegra ICS and JB_MR0 prebuilts
DexOpt anything on /system in /cache/dalvik-cache

Change-Id: Id41d37047f2fcb90d513ac091dfcb85492473689

Allow property to disable dexopt on /cache

Change-Id: Ic74707c4bead387bbf82e4c6d5037efc2d2ebeaf