Added OF side effects to engine.

The compiler needs to be adjusted to output and mutate the OF rules
as the engine now expects. Importantly, the state functions should
no longer return a list of OF rules; instead the list is mutated
by the state function and that "global" variable is used by the
engine's loop.