buffer: Unify `git_fbuffer` and `git_buf`

This makes so much sense that I can't believe it hasn't been done
before. Kill the old `git_fbuffer` and read files straight into
`git_buf` objects.

Also: In order to fully support 4GB files in 32-bit systems, the
`git_buf` implementation has been changed from using `ssize_t` for
storage and storing negative values on allocation failure, to using
`size_t` and changing the buffer pointer to a magical pointer on
allocation failure.

Hopefully this won't break anything.
filter: Apply filters before writing a file to the ODB

Initial implementation. The relevant code is in `blob.c`: the blob write
function has been split into smaller functions.

	- Directly write a file to the ODB in streaming mode

	- Directly write a symlink to the ODB in direct mode

	- Apply a filter, and write a file to the ODB in direct mode

When trying to write a file, we first call `git_filter__load_for_file`,
which populates a filters array with the required filters based on the
filename.

If no filters are resolved to the filename, we can write to the ODB in
streaming mode straight from disk. Otherwise, we load the whole file in
memory and use double-buffering to apply the filter chain. We finish
by writing the file as a whole to the ODB.
buffer: Null terminate on rtrim
filter: Load attributes for file
filter: Add write-to CRLF filter
implement support for username@host:path URLs in transport_find_fn()
config: Refactor & add `git_config_get_mapped`

Sane API for real-world usage.
filter: Precache the filter config options on load
filter: Properly cache filter settings
fix up previous SSH path parsing commit based on @carlosmn feedback
introduced new function: git_remote_supported_url() <-- returns true if this version of libgit2 supports the correct transport mechanism for a URL or path
filter: Beautiful refactoring

Comments soothe my soul.
attr: Change the attribute check macros

The point of having `GIT_ATTR_TRUE` and `GIT_ATTR_FALSE` macros is to be
able to change the way that true and false values are stored inside of
the returned gitattributes value pointer.

However, if these macros are implemented as a simple rename for the
`git_attr__true` pointer, they will always be used with the `==`
operator, and hence we cannot really change the implementation to any
other way that doesn't imply using special pointer values and comparing
them!

We need to do the same thing that core Git does, which is using a
function macro. With `GIT_ATTR_TRUE(attr)`, we can change
internally the way that these values are stored to anything we want.

This commit does that, and rewrites a large chunk of the attributes test
suite to remove duplicated code for expected attributes, and to
properly test the function macro behavior instead of comparing
pointers.
config: Implement a proper cvar cache
config: Add missing file
attr: Add missing header to test suite
Add filter tests and fix some bugs

This adds some initial unit tests for file filtering and fixes
some simple bugs in filter application.
Merge pull request #575 from libgit2/filters

Filters, yo
Add test for possible attr bug

This is a test that should replicate an issue that Peff
is setting with git attributes.  But the test doesn't fail.
Import xdiff library from git

This is the initial import of the xdiff code (LGPL) from
core git as of rev f349b562086e2b7595d8a977d2734ab2ef9e71ef