State Machine Builder and eip connection machine

This implements an abstract definition of a LEAP state machine,
and refactors eip connections to use it.