Add deprecated-mode.git test repository
treebuilder: enhance attributes handling on insertion
Merge pull request #879 from nulltoken/deprecated-mode

Handling of 100664 deprecated mode in tree entries
Make the memory-window conrol structures global

Up to now, the idea was that the user would do all the operations for
one repository in the same thread. Thus we could have the
memory-mapped window information thread-local and avoid any locking.

This is not practical in a few environments, such as Apple's GCD which
allocates threads arbitrarily or the .NET CLR, where the OS-level
thread can change at any moment.

Make the control structure global and protect it with a mutex so we
don't depend on the thread currently executing the code.
Merge pull request #884 from carlosmn/global-windows

Make the memory-window conrol structures global
Tests: close file handles before asserting

Avoids getting ERROR_SHARING_VIOLATION on win32
and killing the entire clar run.
Win32: test core.autocrlf
filemode: introduce enum to ease use of attributes
filemode: deploy enum usage
tree entry: rename git_tree_entry_attributes() into git_tree_entry_filemode()
Merge pull request #889 from nulltoken/filemode-enum

Filemode enum
Add public API for internal ignores

This creates a public API for adding to the internal ignores
list, which already existing but was not accessible.

This adds the new default value for core.excludesfile also.
Wrap up ignore API and add tests

This fills out the ignore API and adds tests.
Merge pull request #891 from arrbee/internal-ignore-api

API for managing in-memory ignore rules
Minor bug fixes in diff code

In looking at PR #878, I found a few small bugs in the diff code,
mostly related to work that can be avoided when processing tree-
to-tree diffs that was always being carried out.  This commit has
some small fixes in it.
Add git_repository_init_ext for power initters

The extended version of repository init adds support for many
of the things that you can do with `git init` and sets up
structures that will make it easier to extend further in the
future.
Add template dir and set gid to repo init

This extends git_repository_init_ext further with support for
initializing the repository from an external template directory
and with support for the "create shared" type flags that make a
set GID repository directory.

This also adds tests for much of the new functionality to the
existing `repo/init.c` test suite.

Also, this adds a bunch of new utility functions including a
very general purpose `git_futils_mkdir` (with the ability to
make paths and to chmod the paths post-creation) and a file
tree copying function `git_futils_cp_r`.  Also, this includes
some new path functions that were useful to keep the code
simple.
fix missing validation and type cast warning
Don't reference stack vars in cleanup callback

If you use the clar cleanup callback function, you can't pass a
reference pointer to a stack allocated variable because when the
cleanup function runs, the stack won't exist anymore.
Some cleanup suggested during review

This cleans up a number of items suggested during code review
with @vmg, including:

* renaming "outside repo" config API to `git_config_open_default`
* killing the `git_config_open_global` API
* removing the `git_` prefix from the static functions in fileops
* removing some unnecessary functionality from the "cp" command