Fix transitive dependencies for GroupIterator/GroupTask

A Java target A has a transitive dep on a Scala target C via an
intermediate JarLibrary/Dependencies target B (ie, "un-flavored" from
GroupTask's perspective.) GroupIterator's call to sort_targets correctly
includes target B, which results in a topsort of 'C <- B <- A'. But
coalesce_targets drops target B, because it doesn't match the
discriminator ("is unflavored".) Because target B is ignored and
coalesce only looks at direct deps, C is allowed to be reordered before
A.

- Must not reorder past an intermediate (dropped) target in
  GroupIterator
  - Allow for more subclasses of GroupTaskTest
  - Add reproduction unit test

https://rbcommons.com/s/twitter/r/706/