[autotest] pull job id from job tag in dynamic_suite

This commit adds code in dynamic_suite.reimage_and_run to determine the
afe job id of the suite being run. Eventually, this job id will be
passed along to all child jobs, to set their parent id. For now, the id
is simply debug logged. The tko_index is also logged, to investigate
under what circumstances these two indices might get out of sync.

I've cherry picked this commit back before the database modifications,
so it should be perfectly safe to pull and test locally on any autotest
instance.

BUG=chromium-os:38253
TEST=Kick of a suite with run_suite.py. my_job_id gets correctly
reported in suite's debug log.
Change-Id: I4202814fe5ed2f2bb7057875b797c8afe999d117
Reviewed-on: https://gerrit.chromium.org/gerrit/42839
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
2 files changed