Add FlowToggle support.

Relays are now called "toggles" (since they might not
be relays in all cases) and are now first-class resources. 

Part of issue #184.