ewma_rate: fix bug in discharging routine

Discharging was weighted. That is, when discharging the current
time delta was multiplied by weight and added to previous
measurement. It should not have been. We should assume no
packets arrived since last measurment.
ewma_rate: minor refactoring, move checks around