moved connection logic into connection Ops

If we move connection logic into their own Ops, then high level graph manipulation becomes a lot easier.  This PR doesn't have that manipulation code, but it moves some of the theano reshaping & stacking etc. from network.py into the body of new Ops in connection.py