Makefile: Rework toolchain logic to enable multi-toolchains

We want to allow building Linux, and potentially other projects, with
a wide range of toolchains to catch compiler problems during
development. However, not all projects can be built with arbitrary
toolchains. Eg. kvm-unit-tests and u-boot don't build with gcc-5.1 but
we want to support it because that is the oldest toolchain supported by
Linux.

Extract the toolchain logic into toolchain.mk and wrap it with a
`define_toolchain` function. The function takes a toolchain name and
a prefix, and defines variables with the given prefix that contain paths
and information about the given toolchain. This way we can define a
different toolchains for Linux, KUT, u-boot, etc.

Migrate existing projects to this setup.

Bug: 193407077
Test: make test
Change-Id: I625ba13400be3c7b9ca3204cb7615fa2c000944a
2 files changed