Draft: Fix events on NaN for double and float attributes
Closes #1207 (closed)
It turns out that the code checking for NaN values was there but was incorrect.
It checked only NaN -> not-NaN transition, which prevented the NaN value to ever be recorded as previous value.
Now the code checks if the NaN status is different between current and last values.