Refactor Jacks to not distinguish between input and output. Refactor AbstractGate to create a Jack on every input/output port.
Refactor basic gates to not use factories: that was a horrible idea. Update appropriate JUnit tests.