improve IList#collect

https://issues.scala-lang.org/browse/SI-6448