Add some utils: fading, sysfs, ld

Support for kernel based fading
- Has its own subdirectory for a enabled device
- Can be enabled or disabled
- Fading length can be configured
- Fading is done in an exponential way to match the logarithmic response
  of the human eye.

Support some fixed point logarithmic calculations which are used for
fading calculations.

Add macros and functions to make it easire to build sysfs attributes
for devices and kobjects.

Change-Id: I87d37aec065891f86403d13a0777b52d9e39a552
Add software based control for the ambient light sensor

The software based approach enables a better control over the
ambient light sensor and its effects.

Control the polling of the ambient light sensor:
- Enable more fine-grained control over the polling time
  (from 250 ms to several minutes to save power)
- Enable polling of the sensor even in user-brightness mode
  and when the screen is off to enable us to react to ambient
  brightness changes also in thos modes.
  Note that a ambient light measure is executed only if there are
  listeners (e.g. the sensor controlled brightness).
  But you can also manually poll by writing to sensor/trigger_measure.
- Use different default polling times for each of the three modes
  (sensor-brightness, user-brightness, screen-off)

Set custom brightness levels for sensor-brightness mode via sysfs.

Make the als gain completely configurable via sysfs.

Use the previously added fading support to enable smooth
transitions between brightness levels. Also enable a delayed
brightness adjustment for sensor-brightness mode.

Use the previously added sysfs stuff to save some code.

Change-Id: I9f29c12fd9b12bef5aa68368183cbcfd8c7c1135
Enable sensor-controlled key led brightness

Use the previously added support for notifications about
ambient light sensor levels to adjust the key led brightness
automatically. This can be controlled via brightness_mode.

Add touchkey_enabled control to disable or enable
key leds illumination upon pressing a key led.

Add fading for smooth transitions to new brightness values.

Cleanups and more sysfs attributes.

Change-Id: I0df06430f48e17935d6b2bcffa209493b2b4bffa