[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202873 91177308-0d34-0410-b5e6-96231b3b80d8