Fix dialog state handling.

Convert ApplicationLightPreference into a DialogPreference to correctly
manage the dialog lifecycle, e.g. when rotating the device. Also save
the user-defined color in case the dialog was open.

Change-Id: Ife00e1c4737fbf6710ccdaa1252def00f2831af3
JIRA:CYAN-914
Fix light settings dialog being unusable in landscape.

Change-Id: I38eeeafd1d8260ab4a7c8de9099a7e270c1462f2
Merge remote branch 'cm/cm-10.1'