ReactiveX/RxScala — pull request #68 by zsxwing (2014-11-28 15:12:54+00:00)
Title: Refactor toMultimap

This PR includes the following breaking changes:
* Change the return type from `Observable[scala.collection.Map[K, Seq[T]]]` to `Observable[mutable.MultiMap[K, V]]`.
* Change the method name `toMultimap` to `toMultiMap` to make it consistent to the return type.
* Remove `toMultimap(keySelector, valueSelector, mapFactory, bufferFactory)`. You can override `MultiMap.makeSet` to create your custom bufferFactory. E.g.,
```Scala
val o : Observable[String] = List("alice", "bob", "carol", "allen", "clarke").toObservable
val keySelector = (s: String) => s.head
val valueSelector = (s: String) => s.tail
val mapFactory = () => new mutable.HashMap[Char, mutable.Set[String]] with mutable.MultiMap[Char, String] {
override def makeSet = new mutable.TreeSet[String]
}
val m = o.toMultiMap(keySelector, valueSelector, mapFactory)
println(m.toBlocking.single)
```