[autotest] Isolate code for autofiled bug keyvals

There was a small amount of duplicated code shared between the code
that records job keyvals when a bug is filed, and the code that
extracts the bug information from keyvals when reporting suite
results.  This pulls that code into a common location so it can
be shared, and modified more transparently.

BUG=None
TEST=run dummy suite on a local autotest instance, see expected results

Change-Id: I65193559447ffadbc02b781a3654743e5143c9ee
Reviewed-on: https://gerrit.chromium.org/gerrit/66592
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Prashanth Balasubramanian <beeps@chromium.org>
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
3 files changed