buildbot-*.sh scripts: move common helpers to a separate script.

Bug: none
Test: ran tests in chroot as described in art/test/README.chroot.md,
      observed no changes in the colored output
Change-Id: I205349d1c4e6344176ce4b49385554e187b22760
5 files changed