Add easier control of whether data resources are processed or not by R8

This is only relevant for R8. D8 will always ignore data resources.

When the current BaseCompilerCommand.setOutput API is used to specify
the output, there is no way of controlling if data resources are
processed or not. Before this change the consumers created when this
API was used would ignore data resources for R8 as well. The only way
to process data resources with R8 was to use a custom consumer through
the API.

This adds an additional setOutput method to the R8Command API which
takes a boolean argument to control if data resources are processed or
not.

The default when the original setOutput is used is now to process data
resources for R8.

Added the option --no-data-resources to the command line to be able to
override this default behaviour.

Change-Id: I87d30c99133bfc365ec30eaacfa1c0755acf38e1
Bug:
diff --git a/src/main/java/com/android/tools/r8/BaseCompilerCommand.java b/src/main/java/com/android/tools/r8/BaseCompilerCommand.java
index b57ff61..6ae611c 100644
--- a/src/main/java/com/android/tools/r8/BaseCompilerCommand.java
+++ b/src/main/java/com/android/tools/r8/BaseCompilerCommand.java
@@ -235,11 +235,16 @@
      * @param outputMode Mode in which to write the output.
      */
     public B setOutput(Path outputPath, OutputMode outputMode) {
+      return setOutput(outputPath, outputMode, false);
+    }
+
+    // This is only public in R8Command.
+    protected B setOutput(Path outputPath, OutputMode outputMode, boolean includeDataResources) {
       assert outputPath != null;
       assert outputMode != null;
       this.outputPath = outputPath;
       this.outputMode = outputMode;
-      programConsumer = createProgramOutputConsumer(outputPath, outputMode, false);
+      programConsumer = createProgramOutputConsumer(outputPath, outputMode, includeDataResources);
       return self();
     }