GROOVY-6863: Moved many methods from java.util.Collection to java.lang.Iterable.

I moved many methods from java.util.Collection to java.lang.Iterable.

This fix is related to https://github.com/groovy/groovy-core/pull/429 and https://github.com/groovy/groovy-core/pull/430 .

I added these methods to Iterable.

grep(Object)
grep()
collect(Closure)
collect()
collect(Collection, Closure)
find(Closure)
find()
findResult(Object, Closure)
findResult(Closure)
findAll(Closure)
findAll()
containsAll(Object[])
split(Closure)
eachPermutation(Closure)
inject(Closure)
inject(Object, Closure)
head()
tail()
asCollection()
plus(Iterable)
plus(Object)
multiply(Number)
intersect(Iterable)
toSet()
toListString()
toListString(int)

I deprecated these methods from Collection.

grep(Object)
grep()
collect(Collection, Closure)
find(Closure)
find()
findResult(Object, Closure)
findResult(Closure)
findAll(Closure)
findAll()
split(Closure)
eachPermutation(Closure)
inject(Closure)
inject(Object, Closure)
toListString()
toListString(int)

I also added this method.

DefaultGroovyMethodsSupport.createSimilarCollection(Iterable)