Gradle Groovy unit tests for lint

The lint Gradle checks were already united tested on the IDE side,
since lint does not have an AST for Groovy, so it relies on IntelliJ's PSI
support for Groovy in the case of Studio, and it relies on Groovy itself from
the Gradle plugin.

However, the tests were not covering everything, and besides it's slightly
trickier to test everything with the IntelliJ inspections support. (As an example,
if an error message has a quote in it, then we can't include the error message
in the marked up source file, so instead we simply insert <warning> instead of
<warning message="full message">).

This CL duplicates the Groovy runner used in the Gradle plugin as part of the
Gradle test itself, such that we can exercise all the parts of the Gradle detector.
It also adds new tests, including some mock support for remote Maven repository
search such that we can ensure that the check to detect new versions works.

Change-Id: I123dc1ccd9a708d7a6f30082ca6dd67b976c916c
29 files changed