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.
Fix light settings dialog being unusable in landscape.
Fix dialog not opening for app-specific notification light settings.