IntelliJ's exclusion mechanism (for Gradle-based projects) is not very
flexible; we get just idea.module.excludeDirs. This patch crawls the
file system to skip what we can.
The sub-project definitions are still in the object directory (and
still installed by |mach gradle-install); over time, we'll migrate
them out.
The Gradle wrapper and {settings,build}.gradle in topsrcdir are
identical to those in mobile/android/gradle. I don't like the
duplication, but I also don't want the burden of keeping the two
configurations identical. We'll move away from the configuration
using mobile/android/gradle as quickly as we can.