avoid NPE when looking for this$0 fields
GROOVY-6863: Move many methods from Collection to Iterable.

Added these methods to Iterable.

contains(Object)
containsAll(Object[])
eachPermutation(Closure)
inject(Closure)
head()
tail()
asCollection()
plus(Iterable)
plus(Object)
multiply(Number)
intersect(Iterable)
toSet()

Deprecated this method from Collection.

eachPermutation(Closure)

Did not add these methods to Iterable because GPathResult conflicts.
Read https://github.com/groovy/groovy-core/pull/444 for the detail.

toListString()
toListString(int)

I also added this method.

DefaultGroovyMethodsSupport.createSimilarCollection(Iterable)

I cannot move these methods because they exists in Object
and Groovy cannot handle properly if I move them from Collection to Iterable.

grep(Object)
grep()
collect(Closure)
collect()
collect(Collection, Closure)
find(Closure)
find()
findResult(Object, Closure)
findResult(Closure)
findAll(Closure)
findAll()
split(Closure)
inject(Closure)
inject(Object, Closure)
GROOVY-6918: GroovyDoc index-all page seems to list methods from private classes which are broken links
Merge pull request #444 from yukoba/MoveToIterable

GROOVY-6863: Move many methods from Collection to Iterable
GROOVY-6921: Closure shared variables loose inferred parameter type value