=str - Various Flow and FlowMaterializer improvements

THIS IS A WIP-BRANCH/PR for discussion and improvement, DO NOT MERGE YET


  - Switches from using size-of-1/2 Vectors to using Lists
  - Fixes an issue where processorForNode wouldn't use the dispatcher form the settings
  - Adds a dedicated Collect fusion op
  - Adds various simplifications to ActorBasedFlowMaterializer
  - Adds FIXMEs where appropriate
  - Switches `grouped` to use a VectorBuilder
  - Adds support for `scan`
In FlowIterableSpec.scala, I get the following test failure:

And the code looks like this:

    "complete empty" in {
      val p = Source(List.empty[Int]).runWith(Sink.publisher)
      val c = StreamTestKit.SubscriberProbe[Int]()
      p.subscribe(c)
      c.expectComplete()
      c.expectNoMsg(100.millis)

      val c2 = StreamTestKit.SubscriberProbe[Int]()
      p.subscribe(c2)
      c2.expectComplete()
    }

Now the test code above is breaking the Reactive Streams spec because it expects first not to get an onSubscribe (which is mandatory by the spec):

    onError | (onSubscribe onNext* (onError | onComplete)?)

But there's another problem with the test/implementation of IterablePublisher since the test above fails with:

[info] - must complete empty *** FAILED ***
[info]   java.lang.AssertionError: assertion failed: expected OnComplete, found OnError(akka.stream.impl.ActorPublisher$NormalShutdownException: Cannot subscribe to shut-down spi.Publisher)
[info]   at scala.Predef$.assert(Predef.scala:179)
[info]   at akka.testkit.TestKitBase$class.expectMsg_internal(TestKit.scala:339)
[info]   at akka.testkit.TestKitBase$class.expectMsg(TestKit.scala:315)
[info]   at akka.testkit.TestKit.expectMsg(TestKit.scala:718)
[info]   at akka.stream.testkit.StreamTestKit$SubscriberProbe.expectComplete(StreamTestKit.scala:105)
[info]   at akka.stream.scaladsl.FlowIterableSpec$$anonfun$2$$anonfun$apply$mcV$sp$2.apply$mcV$sp(FlowIterableSpec.scala:46)
[info]   at akka.stream.scaladsl.FlowIterableSpec$$anonfun$2$$anonfun$apply$mcV$sp$2.apply(FlowIterableSpec.scala:36)
[info]   at akka.stream.scaladsl.FlowIterableSpec$$anonfun$2$$anonfun$apply$mcV$sp$2.apply(FlowIterableSpec.scala:36)
[info]   at org.scalatest.Transformer$$anonfun$apply$1.apply(Transformer.scala:22)
[info]   at org.scalatest.Transformer$$anonfun$apply$1.apply(Transformer.scala:22)
[info]   ...

The test above passed when it used IterablePublisher, but now fails with IterablePublisher. Shouldn't IterablePublisher send onSubscribe + onComplete for new subscribers after it has completed?

Ping @patriknw, @ktoso, @2m, @bantonsson, @rkuhn