GRADLE-2992 reduce length of the classpath produced by the 'application' plugin - Step 1: eliminate duplicate classpath components, retaining only the first mention

See also http://forums.gradle.org/gradle/topics/gradle_application_plugin_and_cmd_exe_line_size_limitations#reply_13748510
GRADLE-2992 reduce length of the classpath produced by the 'application' plugin - Step 2: build classpath env variable incrementally and provide an option to omit it from the java executable parameters.

See also http://forums.gradle.org/gradle/topics/gradle_application_plugin_and_cmd_exe_line_size_limitations#reply_13748510