reactive: factor out state/transitions into a module

Separate the model loop from state updates.
reactive: Update state based on PortStatus messages

Note that this does not yet update flowtable rules on switches.
reactive: fix bug in in Eof cases

These cases were updating `state`, i.e., the initial state rather than `s`,
the current state. Rename it `init_state` to avoid this confusion in the
future.