saves flashlight brightness to nsuserdefaults.