Add basic command line parsing to TestMain.

Summary:
This allows unit tests for components that use Support/Debug.h to print
debug information from test runs by specifying -debug when running the
test.

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D301

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