[1/2] Add triggers to change profile based on AP

Add data structure mWifiTriggers to store triggers per profile.
Add network change listener to switch to profile

Change-Id: I97e360d7783d3b0e2bbd70fe7a9a866d8c0fa7cd
Fix ringer mode being unneededly changed by setting ringer mode volume
to 0.

When having set the ringer mode to silent on a device with vibrator and
calling setStreamVolume() for the ringer stream again (e.g. in one of
the volume control dialogs in the settings app), the ringer mode is set
to vibrate, although there's no reason to do so.

Fix that by remembering the last non-normal (that is, either silent or
vibrate) ringer mode and using that when setting the stream volume to 0.

Change-Id: I27f1c75a0fef52bd63ac20f4101042808ce2c458
JIRA: CYAN-1403
QuickSettings : Battery initial status

Battery tile upon being added relies on a battery level changed call
to update its status. Thus if upon adding, the battery level is not changing
or till the period when it updates, the tile shows an unknown state.

This patchset resolves this issue by making the controller store its last received value
and distributing it to the tiles when they register for changes.

https://jira.cyanogenmod.org/browse/CYAN-1374

Change-Id: Ia2e887e545430ed02c179a3c8f4b7e269a4817c8
Check and fail early if requested wallpaper size exceeds maximum texture size.

This fixes an issue where OpenGL initialization succeeds but buffer allocation fails because the requested wallpaper size
is too large (or otherwise unsupported) by the graphics hardware. This fixes an issue where SystemUI crashes constantly
on the PandaBoard when connected to a full HD display. Tested only on PandaBoard, no access to alternative hardware.
Signed-off-by: Wim Vander Schelden <wim.vander.schelden@philips.com>

Change-Id: I8d2e1ae9fd9772977c4e365f23f2f58bbca3787c
Don't assume any ringtone is present on external storage.

If that assumption doesn't hold true, the user will lose his ringtone
and won't know why.

Change-Id: I89409e1351792d020c5458f5104f4bb9f2a040f2