Update clar
Make tests take umask into account

It seems that libgit2 is correctly applying the umask when
initializing a repository from a template and when creating new
directories during checkout, but the test suite is not accounting
for possible variations due to the umask.  This updates that so
that the test suite will work regardless of the umask.
Clean up one other mode_t assertion
_umask is function name on Windows
Fix tests to use core.filemode correctly

Some windows tests were failing
Fix some newer GCC compiler warnings
Add more file mode permissions macros

This adds some more macros for some standard operations on file
modes, particularly related to permissions, and then updates a
number of places around the code base to use the new macros.
Fix tests of file modes

This fixes an issue checking file modes in the tests that
initialize a repo from a template directory when a symlink is
used in the template.  Also, this updates some other places where
we are examining file modes to use the new macros.
GIT_MODE_TYPE should exclude setgid bits

The GIT_MODE_TYPE macro was looking at all bits above the
permissions, but it should really just look at the top bits so
that it will give the right results for a setgid or setuid entry.

Since we're now using these macros in the tests, this was causing
a test failure on platforms that don't support setgid.
Better macro name for is-exec-bit-set test
Merge pull request #1829 from libgit2/fix-umask-fragility

Fix umask fragility