Set previous_nominal_speed to 0 if the next block is a zero move block s...

...o jerk can be calculated correctly

clean up some stuff