Corrected current / last light switch status

Corrected issue where SwitchEvent (for light on/off events) did not execute as intended.
Changed from looking at lightswitch.latestValue to a new state variable state.lightswitchlastValue which will return the last change event to compare with the current change event.