Work around gradle dist zip download error

Explicitly specify wrapper.distributionUrl in order to avoid 301
redirect now being served from the default distribution url, which is
http://services.gradle.org/distributions/gradle-1.11-bin.zip.

For reasons as yet unknown, this redirect is not being followed when
gradlew is bootstrapping itself.
Update language level from 1.7 to 1.8
Replace explicit types with <> (main)
Replace explicit types with <> (test)
Use lambda expressions where possible (main)
Use lambda expressions where possible (test)
Replace external iteration with stream API (main)
Replace external iteration with stream API (test)