Allow flags and targets to be specified as maps or sets (#1730)

This is a second attempt at #1727, now with tests (until now, bazelci.py
had no tests!)

Motivation: https://github.com/bazelbuild/stardoc/pull/184

We often want to specify a base list of flags/targets which can be
augmented on "weird" platforms (Windows, perhaps Mac). But to use the
YAML `<<:` merge key, the entities merged must be maps or sets, not
lists.

To do this, we can allow *_flags and *_targets to be maps or sets - but
we must take care to transform them to lists when processing, so that
list concatenation etc. operators still work.
3 files changed