Gradle in IDEA: fix the project generation

This pull request has been suggested in [this gradle forum thread](http://gsfn.us/t/4beft) by Luke Daley.

Generating the IDEA project for Gradle leads to a project that can be opened in IDEA, but that can't be built without manually tweaking the project:
 - the checkbox "Use external build" must be unchecked in the compiler settings
 - a groovy source file must be excluded from stub generation

The first two commits in this PR solve these two problems.

The third commit adds a note to the README explaining that the build must be done twice to succeed, due to an IDEA glitch.

This has been tested with IDEA 12.1.6. I'm not sure which version is used by the main Gradle developers. It might be worth testing the project creation with their version, to see if everything works fine.