Refactor ARM subarchitecture parsing

According to a FIXME in ARMMCTargetDesc.cpp the ARM version parsing should be
in the Triple helper class.

Patch by: Gabor Ballabas

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212479 91177308-0d34-0410-b5e6-96231b3b80d8
Use raw_fd_ostream instead of std::ofstream.

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