Optimize critical sections for main loop heater control calculations (PID).
Avoid copying the entire control state while in a critical section. Also
use PositionTraverse to get more efficient code.