Gradle: respect module build classpath for build scripts resolving
review: http://crucible.labs.intellij.net/cru/CR-IC-4038

related issue - IDEA-118523 Gradle plugin is not resolving Apache Ant imports
(cherry picked from commits 9a9c4bc,  8277c63)
Gradle: dependencies scope merge and sourceSets type handling updated
related issues:
IDEA-119365 Gradle import does not respect model customisations
IDEA-118280 Gradle import: IDEA detect java folder as a resource folder
IDEA-117668 IDEA v13 spontaneously changes additional test source root to source root
(cherry picked from commit 68bfa5e)
IDEA-119467 Gradle: auto discovery of buildSrc project
IDEA-98930 IDEA does not resolve dependencies in Gradle buildSrc/ project
(cherry picked from commit 0982afc)
IDEA-119336 Gradle build files: build.gradle scripts are checkout from Perforce even if the file is not changed
(cherry picked from commit 3234c0b)
Gradle: test data fix
(cherry picked from commit c864c4b)
NPE fix
(cherry picked from commit 1eb3644)
IDEA-115351 Idea UI hangs after performing Move Module to group
(cherry picked from commit 673ed61) [r=Maxim.Mossienko]