Add options to control executer threads and CPUs

* D8/R8/L8 gets the --thread-count option (currently not documented) to
  control the threads created in the Java Executor
* run_on_app.py gets the option --cpu-list to pin execution to a fixed
  set of cpus

Change-Id: I288bd8024b3c6b2acd5eebb284447ee5bd3456be
diff --git a/tools/toolhelper.py b/tools/toolhelper.py
index 2784ea5..806205f 100644
--- a/tools/toolhelper.py
+++ b/tools/toolhelper.py
@@ -11,12 +11,13 @@
 
 def run(tool, args, build=None, debug=True,
         profile=False, track_memory_file=None, extra_args=None,
-        stderr=None, stdout=None, return_stdout=False, timeout=0, quiet=False):
+        stderr=None, stdout=None, return_stdout=False, timeout=0, quiet=False,
+        cmd_prefix=[]):
   if build is None:
     build, args = extract_build_from_args(args)
   if build:
     gradle.RunGradle(['r8lib' if tool.startswith('r8lib') else 'r8'])
-  cmd = []
+  cmd = cmd_prefix
   if track_memory_file:
     cmd.extend(['tools/track_memory.sh', track_memory_file])
   cmd.append(jdk.GetJavaExecutable())