improve rendering of more complicated pipelines

* share common gateway nodes rather than duplicating for each job
* fix gateway rendering; this regressed with the dagre upgrade
* fix logic for generating edges for a job that depends on two different
  resources with passed: [a, c] and passed: [c]; previously it would
  only render a single edge, now it will render one from the first's
  gateway and a second from from the second's job