Support 'provided' dependencies in IntelliJ Idea build

This adds support to the Gradle builds for IntelliJ to import the project and have classpaths set correctly. 

Gradle documentation for these changes: http://www.gradle.org/docs/current/dsl/org.gradle.plugins.ide.idea.model.IdeaModule.html