Added a function to strip ANSI escape codes from strings generated by test harnesses in order to ensure that JSON and XML formatted output does not cause problems for parsers.

The StripAnsi() function was added to otest-shim.m and has the ability to strip all ANSI
escape codes from output strings except for keyboard change codes, which are not relevant
to this scenario.
Modified to simplify regex string.
Merge pull request #142 from cpeterso87/task-2654386

XCTool strip ANSI escape codes from test output.
Fix for task #143. Changed assertion to semantic equality.
Prevent a crash (EXC_BAD_ACCESS)on 10.7 and Xcode 4

This is the crash I was getting. Removing the copy makes it go away, matching
__write_nocancel above

Process:         otest [46217]
Path:            /Applications/Xcode.app/Contents/Developer/Tools/otest
Identifier:      otest
Version:         ??? (???)
Code Type:       X86-64 (Native)
Parent Process:  xctool [46151]

Date/Time:       2013-09-09 22:17:02.355 -0700
OS Version:      Mac OS X 10.7.5 (11G63)
Report Version:  9

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000

VM Regions Near 0:
-->
    __TEXT                 000000010b43a000-000000010b43e000 [   16K] r-x/rwx SM=COW  /Applications/Xcode.app/Contents/Developer/Tools/otest

Application Specific Information:
objc_msgSend() selector name: copy

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libobjc.A.dylib                 0x00007fff84ac1e96 objc_msgSend + 22
1   otest-shim-osx.dylib            0x000000010b446208 __write + 116 (otest-shim.m:277)
2   libobjc.A.dylib                 0x00007fff84ace71c _objc_syslog + 60
3   libobjc.A.dylib                 0x00007fff84ace95f _objc_inform + 181
4   libobjc.A.dylib                 0x00007fff84aba974 map_images_nolock + 750
5   libobjc.A.dylib                 0x00007fff84aba622 map_images + 115
6   dyld                            0x00007fff6b03f3dd _ZN4dyldL18notifyBatchPartialE17dyld_image_statesbPFPKcS0_jPK15dyld_image_infoE + 964
7   dyld                            0x00007fff6b03f50b dyld::registerImageStateBatchChangeHandler(dyld_image_states, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*)) + 180
8   libdyld.dylib                   0x00007fff8b444acc dyld_register_image_state_change_handler + 81
9   libobjc.A.dylib                 0x00007fff84ab903a _objc_init + 58
10  dyld                            0x00007fff6b049da6 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 218
11  dyld                            0x00007fff6b049af2 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 46
Merge pull request #149 from LegNeato/master

Prevent a crash (EXC_BAD_ACCESS)on 10.7 and Xcode 4
updated .gitignore to be compatible w/ Xcode 5
Save all exceptions raised in a test

By default SenTestRun will log every exception raised, not just the
first one. otest-shim will now send all exceptions to the reporters.
Note that often only the first exception is useful, so the reporters
continue to only display the first exception.
Split concept of test failures versus test errors

In the current version of xctool there is no separation of tests that
fail (an assertion fails) versus tests with errors (a non-assert
exception is thrown). This change splits non-passing tests into the two
catagories.

Note that since we now keep track of the number of passes manually
rather than rely on [SenTestRun testCaseCount] the total number of tests
reported will be the number of tests actually run, not the number of
tests configured. It could be argued that the test error count should
also include the number of tests configered but not run, but for now it
doesn't do that.
Collapse test suites into a single suite

Multiple levels have test suites is of questionable value and creates a
headache in xctool. For example, when running tests in parallel the test
suite is emitted for each grouping of tests, even if they're within the
same suite.

This change will only emit the first test suite seen, ignoring any
others.
Move Reporters classes to Common

In a followup commit OCUnitCrashFilter will become a reporter so it can
receive all of the events that a reporter receives. To do this we need
to move the Reporters code to Common.
This commit changes the list to an NSArray and removes the 'All' keyword.

OCUnitTestRunner will soon require the entire list of tests to be passed
into its constructor. This will allow it to emit failures for all
remaining tests.
Add support for emitting results for all tests, even after a crash

Previously if a test suite/test case crashed we wouldn't get any output
for remaining tests. This change will instead emit test results for ALL
tests, even those that didn't get a chance to run. If a test didn't run
then we consider it a failure and label it with a message stating so.

To implement this, OCUnitCrashFilter was changed to implement the
reporter class so it can listen to all events that the reporters are
getting. With the help of the new OC*State classes it will keep track of
what the state of the test run is. If the test suite crashes for any
reason then OCUnitCrashFilter will take over emitting results that the
otest-shim would have emitted.