We're seeing random ckati segfaults, and ASAN only hides the problem, so
attempt to capture more information.
Bug: 36182021
Test: build/soong/build_test.bash, kill -SIGSEGV <ckati>
Change-Id: I854ae846df0c47f69ec8d39b9a3d9e6f482e0854
Move common microfactory functions to cmd/microfactory/microfactory.bash
so that they can be used to build both soong_ui for normal build and
multiproduct_kati for build system tests.
Test: m -j
Test: build/soong/build_test.bash
Change-Id: I9512642d846ce54d05a027b6d33a2b3029b3f90b