[autotest] HostScheduler maintain suite hosts assignment history.

This is part I of making host scheduler support a min_dut
requirement per suite.

With this CL, host scheduler is able to load and maintain
a record of current suite host assignment.

This CL:
1) Introduces host_scheduler.SuiteRecorder,
   which holds suite host assignment
   history, i.e which host has been assigned to which suite.
   And provide functionality to update its record
   when a host is assigned to a suite and when a host is released.

2) Adds some util methods in query_manager
   - load suite host assignment on the start of host scheduler.
   - load suite_min_duts job keyval for a suite from db.

CL-DEPEND=CL:231210
DEPLOY=host_scheduler
TEST=Add unittest for host_scheduler.
TEST=Schedule two suites with different "suite_min_duts".
Print out the current record hold by SuiteRecorder.
Confirm that the record is correct when a host
is assigned to a suite, when a host is released,
and when host_scheduler starts with the jobs already running.
TEST=Integration test with CL:231210 by running two bvt-cq suites
with different priority and suite_min_duts. Set testing_mode=True
and testing_exception=test_suites.
TEST=Integration test with CL:231210. Test the host scheduler
inline mode still works by setting inline_host_acquisition=True
and running two suites with different priority.

BUG=chromium:432648

Change-Id: I0045537fe69f5d0c06ea51c60ba254e9c505642c
Reviewed-on: https://chromium-review.googlesource.com/231139
Reviewed-by: Prashanth B <beeps@chromium.org>
Commit-Queue: Fang Deng <fdeng@chromium.org>
Tested-by: Fang Deng <fdeng@chromium.org>
3 files changed