Win32: UTF-8 <-> WCHAR conversion overhaul
Fire progress callbacks also for pushes.

It's not very useful to only know that a pre-receive hook has declined
a push, you probably want to know why.
Check the return codes of remote callbacks.

The user may have requested that the operation be cancelled.
Rename progress callback to sideband_progress
Don't redefine the same callback types, their signatures may change
It is safe to free() a NULL pointer
Correct argument order of git__calloc()
Fire update_tips callback also for pushes.
Verify update_tips callbacks in push test cases
Handle win32 reparse points properly
remote: provide read access to the callback structure

This should make it easier for bindings to dynamically override their
own callbacks.
transports: allow the creds callback to say it doesn't exist

Allow the credentials callback to return GIT_PASSTHROUGH to make the
transports code behave as though none was set.

This should make it easier for bindings to behave closer to the C code
when there is no credentials callback set at their level.
Merge pull request #2282 from libgit2/cmn/remote-easier-bind

A few niceties for binding authors
Some doc and examples/diff.c changes

I was playing with "git diff-index" and wanted to be able to
emulate that behavior a little more closely with the diff example.

Also, I wanted to play with running `git_diff_tree_to_workdir`
directly even though core Git doesn't exactly have the equivalent,
so I added a command line option for that and tweaked some other
things in the example code.

This changes a minor output thing in that the "raw" print helper
function will no longer add ellipses (...) if the OID is not
actually abbreviated.
Use git_diff_get_stats in example/diff + refactor

This takes the `--stat` and related example options in the example
diff.c program and converts them to use the `git_diff_get_stats`
API which nicely formats stats for you.

I went to add bar-graph scaling to the stats formatter and noticed
that the `git_diff_stats` structure was holding on to all of the
`git_patch` objects.  Unfortunately, each of these objects keeps
the full text of the diff in memory, so this is very expensive.  I
ended up modifying `git_diff_stats` to keep just the data that it
needs to keep and allowed it to release the patches.  Then, I added
width scaling to the output on top of that.

In making the diff example program match 'git diff' output, I ended
up removing an newline from the sumamry output which I then had to
compensate for in the email formatting to match the expectations.

Lastly, I went through and refactored the tests to use a couple of
helper functions and reduce the overall amount of code there.
Replace math fns with simpler integer math
Make stash and checkout ignore contained repos

To emulate git, stash should not remove untracked git repositories
inside the parent repo, and checkout's REMOVE_UNTRACKED should
also skip over these items.

`git stash` actually prints a warning message for these items.
That should be possible with a checkout notify callback if you
wanted to, although it would require a bit of extra logic as things
are at the moment.
Failing test for stashing a buried ignored file
patch: emit binary patches (optionally)
Make checkout match diff for untracked/ignored dir

When diff finds an untracked directory, it emulates Git behavior
by looking inside the directory to see if there are any untracked
items inside it. If there are only ignored items inside the dir,
then diff considers it ignored, even if there is no direct ignore
rule for it.

Checkout was not copying this behavior - when it found an untracked
directory, it just treated it as untracked.  Unfortunately, when
combined with GIT_CHECKOUT_REMOVE_UNTRACKED, this made is seem that
checkout (and stash, which uses checkout) was removing ignored
items when you had only asked it to remove untracked ones.

This commit moves the logic for advancing past an untracked dir
while scanning for non-ignored items into an iterator helper fn,
and uses that for both diff and checkout.