bazel: Generalize CMake test converter rules

Support BOARD STREQUAL conditions (ignoring unit_testing branches),
set_ifndef variable assignments, file(MAKE_DIRECTORY) mkdirs, and
external ${ZEPHYR_BASE} file(GLOB) fallback in generate_test_build.py,
and remove hardcoded exclude_qemu_cm3_pkgs.

Change-Id: Iceec535c44fe4f567b96087146c5e070b66b602b
Reviewed-on: https://pigweed-review.googlesource.com/c/third_party/github/zephyrproject-rtos/zephyr/+/510834
2 files changed