Introduce CommandEnvironment and pass it instead of BlazeRuntime.

The very long term plan is to make BlazeRuntime immutable, so that we can
run multiple commands in the same server.

--
MOS_MIGRATED_REVID=103080946
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommand.java
index 61f46a8..c050043 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommand.java
@@ -39,7 +39,7 @@
    * shut down and the exit status will be 0 (in case the shutdown succeeds
    * without error).
    *
-   * @param runtime The Blaze runtime requesting the execution of the command
+   * @param env The environment for the current command invocation
    * @param options A parsed options instance initialized with the values for
    *     the options specified in {@link Command#options()}.
    *
@@ -47,7 +47,7 @@
    * @throws BlazeCommandDispatcher.ShutdownBlazeServerException Indicates
    *     that the command wants to shutdown the Blaze server.
    */
-  ExitCode exec(BlazeRuntime runtime, OptionsProvider options)
+  ExitCode exec(CommandEnvironment env, OptionsProvider options)
       throws BlazeCommandDispatcher.ShutdownBlazeServerException;
 
   /**
@@ -55,9 +55,10 @@
    * requirements. This method is called after all command-line and rc file options have been
    * parsed.
    *
-   * @param runtime The Blaze runtime requesting the execution of the command
+   * @param env the command environment of the currently running command
+   * @param optionsParser the options parser for the current command
    *
    * @throws AbruptExitException if something went wrong
    */
-  void editOptions(BlazeRuntime runtime, OptionsParser optionsParser) throws AbruptExitException;
+  void editOptions(CommandEnvironment env, OptionsParser optionsParser) throws AbruptExitException;
 }