controller: Change step/iteration state management.

Rework tracking of current time, step, and iteration.

Signed-off-by: Matthew Emmett <memmett@gmail.com>