config: decouple the backend from the reader at the low level

In order to support config includes, we must differentiate between the
backend's main file and the file we are currently parsing.

This lays the groundwork for includes, keeping the current behaviours.
config: add support for include directives

Relative, absolute and home-relative paths are supported. The
recursion limit it set at 10, just like in git.
config: keep a list of included files

When refreshing we need to refresh if any of the files have been
touched, so we need to keep the list.
config: refresh included files

We need to refresh the variables from the included files if they are
changed, so loop over all included files and re-parse the files if any
of them has changed.
config: fix variable overriding

When two or more variables of the same name exist and the user asks
for a scalar, we must return the latest value assign to it.
config: return an error when reaching the maximum include depth
config: handle realloc issues from larger depths

As the include depth increases, the chance of a realloc
increases. This means that whenever we run git_array_alloc() or call
config_parse(), we need to remember what our reader's index is so we
can look it up again.
Fix failure in win32_find_git_in_registry()

The buffer size 0 was definitely not enough so it failed
Fix failure in win32_find_git_in_registry() when UAC is turned on

Demand read only access to registry key instead of full access.
This might happen in Windows Vista and later.
Merge pull request #1857 from linquize/find-git-path-win32

Fix failure in win32 git path guessing
Merge pull request #1833 from libgit2/cmn/config-include

Support config includes
Refactor git_win32__find_system_dirs() to extract "etc\\" as subpath parameter
Can guess win32 git template dir
Can git_libgit2_opts() with GIT_OPT_GET_TEMPLATE_PATH and GIT_OPT_SET_TEMPLATE_PATH
Can load default template directory
Start of filter API + git_blob_filtered_content

This begins the process of exposing git_filter objects to the
public API.  This includes:

* new public type and API for `git_buffer` through which an
  allocated buffer can be passed to the user
* new API `git_blob_filtered_content`
* make the git_filter type and GIT_FILTER_TO_... constants public
Create public filter object and use it

This creates include/sys/filter.h with a basic definition of a
git_filter and then converts the internal code to use it.  There
are related internal objects (git_filter_list) that we will want
to publish at some point, but this is a first step.
Make git_filter_source opaque
Add attributes to filters and fix registry

The filter registry as implemented was too primitive to actually
work once multiple filters were coming into play.  This expands
the implementation of the registry to handle multiple prioritized
filters correctly.

Additionally, this adds an "attributes" field to a filter that
makes it really really easy to implement filters that are based
on one or more attribute values.  The lookup and even simple value
checking can all happen automatically without custom filter code.

Lastly, with the registry improvements, this fills out the filter
lifecycle callbacks, with initialize and shutdown callbacks that
will be called before the filter is first used and after it is
last invoked.  This allows for system-wide initialization and
cleanup by the filter.
Extend public filter api with filter lists

This moves the git_filter_list into the public API so that users
can create, apply, and dispose of filter lists.  This allows more
granular application of filters to user data outside of libgit2
internals.

This also converts all the internal usage of filters to the public
APIs along with a few small tweaks to make it easier to use the
public git_buffer stuff alongside the internal git_buf.