JRubyScriptUtils defensively handles null Nodes in findClassNode (fails against JRuby 1.7.12 otherwise)

Issue: SPR-11747
(cherry picked from commit adb616b)
Upgraded to Gradle 1.12 and updated selected dependencies
(cherry picked from commit e84f61b)