reflog: move the reflog implementation into refdb_fs

References and their logs are logically coupled, let's make it so in
the code by moving the fs-based reflog implementation to live next to
the fs-based refs one.

As part of the change, make the function take names rather than
references, as only the names are relevant when looking up and
handling reflogs.
reflog: add a convenience append function

Provide a function that reads a reflog, performs an append and writes back to the
backend in one call.
reflog: bring _append and _drop back to the frontend

These functions act purely on the reflog data structure.
indexer: do multiple passes over the delta list

Though unusual, a packfile may contain a delta whose base is a delta
that comes later. In order index such a packfile, we must not give up
on the first failure to resolve a delta, but keep it around.

If there is a pass which makes no progress, this indicates that the
packfile is broken, so fail accordingly.
pack: move the object header function here
indexer: fix thin packs

When given an ODB from which to read objects, the indexer will attempt
to inject the missing bases at the end of the pack and update the
header and trailer to reflect the new contents.
net: advertise our support for fixing thin packs
indexer: inject one base at a time

There may be multiple deltas referencing the same base as well as OFS
deltas which rely on a thin delta. Deal with both at the same time by
injecting a single object and going back up to the main
delta-resolving loop.
indexer: clearer stats for thin packs

Don't increase the number of total objects, as it can produce
suprising progress output. The only addition compared to pre-thin is
the addition of local_objects to allow an output similar to git's
"completed with %d local objects".
Rename the ssh credentials

The names from libssh2 are somewhat obtuse for us. We can simplify the
usual key/passphrase credential's name, as well as make clearer what the
custom signature function is.
examples: show used local objects in fetch

Show how many local objects were used to fix the thin pack in our fetch
example.
indexer: include the delta stats

The user is unable to derive the number of deltas in the pack, as that
would require them to capture the stats exactly in the moment between
download and final processing, which is abstracted away in the fetch.

Capture these numbers for the user and expose them in the progress
struct. The clone and fetch examples now also present this information
to the user.
Allow -DWINHTTP=OFF to disable WinHTTP
Use two calls to set two headers
Merge pull request #1911 from ethomson/http_headers

Use two calls to set two headers
Merge pull request #1910 from ethomson/disable_winhttp

Allow -DWINHTTP=OFF to disable WinHTTP
Test for failure, but don't test the error message
remove rpm spec

Fedora provides a rpm package for libgit2 -
https://apps.fedoraproject.org/packages/libgit2.
Merge pull request #1913 from nvloff/remove_fedora_spec

remove rpm spec file and readme
The "common.h" should be included before "config.h".

When building libgit2 for ia32 architecture on a x64 machine, including
"config.h" without a "common.h" would result the following error:
C:\Program Files\Microsoft SDKs\Windows\v7.1\include\winbase.h(2288): error C2373: 'InterlockedIncrement' : redefinition; different type modifiers [C:\cygwin\home\zcbenz\codes\git-utils\build\libgit2.vcxproj]
C:\Program Files\Microsoft SDKs\Windows\v7.1\include\winbase.h(2295): error C2373: 'InterlockedDecrement' : redefinition; different type modifiers [C:\cygwin\home\zcbenz\codes\git-utils\build\libgit2.vcxproj]
C:\Program Files\Microsoft SDKs\Windows\v7.1\include\winbase.h(2303): error C2373: 'InterlockedExchange' : redefinition; different type modifiers [C:\cygwin\home\zcbenz\codes\git-utils\build\libgit2.vcxproj]
C:\Program Files\Microsoft SDKs\Windows\v7.1\include\winbase.h(2314): error C2373: 'InterlockedExchangeAdd' : redefinition; different type modifiers [C:\cygwin\home\zcbenz\codes\git-utils\build\libgit2.vcxproj]