Add additional support for unregistering listeners in ShadowSensorManager

As it currently does not handle the case when there's no Sensor to give as parameter.