[Mips] Check all MIPS toolchains to find the one that best meets command
line arguments and directories tree. The old toolchain selection heuristics
worked incorrectly when user has a reduced MIPS toolchain supports
the O32 ABI only.

Patch reviewed by Jonathan Roelofs, David Majnemer.