[autotest] Thread priority from create_suite_job through to create_job.

This schedules a suite job itself at the same priority level of its
tests, and also injects the priority value into the suite control files.

The change to thread priority through from dynamic_suite into create_job
needs to happen concurrently, because the type of `priority` is changing
from a string to an int.  This also means everything that passes in a
priority gets fixed up in this CL.

suite_scheduler has also been tweaked to schedule all tests at the
PostBuild priority (for now...).

This also does all of the work to get priority to show up by name
instead of by integral value.  In the create_job pane, we disallow
anyone to schedule a job at a priority that would preempt major build
processes (anything coming from a waterfall).  However, all old jobs are
shown at the integral value, because showing two seperate priority
scales at the same time would be incredibly confusing.  (Especially
since URGENT would be incredibly low priority)

BUG=chromium:250583
DEPLOY=afe, apache, suite_scheduler
TEST=unit, run_suite with a priority level

Change-Id: I9ecf5ceed5c58bd8ee0815c6d15f4aba300082fe
Reviewed-on: https://chromium-review.googlesource.com/168143
Reviewed-by: Alex Miller <milleral@chromium.org>
Tested-by: Alex Miller <milleral@chromium.org>
Commit-Queue: Alex Miller <milleral@chromium.org>
diff --git a/frontend/afe/rpc_utils.py b/frontend/afe/rpc_utils.py
index 24af4c0..3628d90 100644
--- a/frontend/afe/rpc_utils.py
+++ b/frontend/afe/rpc_utils.py
@@ -9,6 +9,7 @@
 import datetime, os, inspect
 import django.http
 from autotest_lib.frontend.afe import models, model_logic
+from autotest_lib.client.common_lib import priorities
 from autotest_lib.client.common_lib import control_data, error
 from autotest_lib.server.cros import provision
 
@@ -685,6 +686,11 @@
     Returns a subset of local_args, which contains only the arguments that can
     be passed in to create_job_common().
     """
+    # This code is only here to not kill suites scheduling tests when priority
+    # becomes an int instead of a string.
+    if isinstance(local_args['priority'], str):
+        local_args['priority'] = priorities.Priority.DEFAULT
+    # </migration hack>
     arg_names, _, _, _ = inspect.getargspec(create_job_common)
     return dict(item for item in local_args.iteritems() if item[0] in arg_names)