Report errors before aborting from cleanup exceptions

Might make debugging a bit easier next time
Merge pull request #22 from scottjg/report-before-abort

Report errors before aborting from cleanup exceptions
Add test suite categories to clar

This adds the ability to categories test suites in clar and to
activate individual categories of tests from the command line.
Updated generated clar.py after rebase
Add prefix matching to -s command line flag

This allows you to do things like "clar -s=core::" to run all tests
that are prefixed with "core::" which is an easy way to focus
which part of a test suite you are using without categories.
Add flag to exit on first error

This adds a "-Q" (quit) flag to cause the test suite to exit
after the first error occurs.  This shouldn't be the default
behavior, but sometimes when I really mess up the tests, I
just want to see the first problem and fix it, knowing that
that will probably fix the next 1000 errors, too.
Convert category to generate time CL_IN_CATEGORY

This converts the category implementation from the `cl_in_category`
run time categorization to a test suite generation time macro
based version that looks for a `CL_IN_CATEGORY` macro and builds
static tables of per-test-suite category lists.
Updating docs for CL_IN_CATEGORY approach
Merge pull request #23 from arrbee/add-categories

Add categories to clar
Hey I'm @vmg
Open on-disk files as UTF-8 to prevent encoding errors
Add MIT license
Fix warnings and errors on win32

There were a few warnings because MSVC incorrectly interprets
"const char **" as a const array instead of a variable array of
const pointers.  Also, fixed use of strcasecmp.
Merge pull request #24 from arrbee/fix-win32

Fix warnings and errors on win32
qsort requires cdecl callback on some Win32 cfg
Merge pull request #25 from arrbee/master

Add cdecl to qsort callback
Stop using SHFileOperation on Win32 (for speed)
Reliability improvements for copy/remove on Win32
Merge pull request #26 from phkelley/win32_fileops

Stop using SHFileOperation on Win32 (for speed)
Flush stdout after writing an error.

In rare cases, it can happen that after printing an error to stdout, the
generated program crashs. This ensures that at least the last error was
output and so allows the developer to see what test actually had the
problem.

For details on the circumstances see:
https://github.com/libgit2/libgit2/issues/1096