Add back backlight brightness curve adjustment.

Change-Id: I58408111d6366a281303afb469d78588ae88d275

Conflicts:
	services/java/com/android/server/power/DisplayPowerController.java
Fix race condition in backlight adjustment.

When configuring the automatic backlight levels, there's a race
condition in setting the lux and brightness settings as the settings
provider doesn't allow storing multiple settings atomically. When
deleting rows, there's quite a high chance of DisplayPowerController
picking up a state where the lux values already have the lower number of
rows, but the brightness values do not, effectively leading to an
ArrayIndexOutOfBoundsException.

Fix that by
- waiting a second of cool-down time until applying the settings and
- adding a sanity check for the very unlikely case that the delay
  between writing both values is > 1 second

Change-Id: I44e41530fc5334aaefc4ab7d3a90542f78fabe0c
JIRA:CYAN-755
Improve auto-brightness handling

- Add a setting to control the auto-brightness algorithm responsitivity
- Make the algorithm react much faster when the ambient brightness
  increases quickly, e.g. when receiving a call in bright sunlight.

Change-Id: Ic608901c476609dde69cae982228c09567140a83
Framework: Add support to enable/disable Electron Beam (1/2)

Parts were brought over from CM9 but not all of it.  This completes
the port.

Change-Id: I2ab24581ca775ec7af3eecf7e1dcac72c91e3124

Conflicts:
	core/res/res/values/config.xml
	core/res/res/values/symbols.xml