refs: Centralize reference creation logic
refs: Introduce git_reference_create_with_log()
refs: Introduce git_reference_symbolic_create_with_log()
refs: Introduce git_reference_set_target_with_log()
refs: Introduce git_reference_symbolic_set_target_with_log()
refs: adjust to the new reflog API
refdb: add a `message` parameter for appending to the log

This is as yet unused.
reflog: integrate into the ref writing

Whenever a reference is created or updated, we need to write to the
reflog regardless of whether the user gave us a message, so we shouldn't
leave that to the ref frontend, but integrate it into the backend.

This also eliminates the race between ref update and writing to the
reflog, as we protect the reflog with the ref lock.

As an additional benefit, this reflog append on the backend happens by
appending to the file instead of parsing and rewriting it.
reflog: remove git_reflog_append_to()

This was a convenience method for the refs front-end to do the reflog
writing. This is now done in the backend and it has no more reason for
being.
Introduce git_revert to revert a single commit
clean up state metadata more consistently
Updates to cancellation logic during download and indexing of packfile.
Merge pull request #1977 from ethomson/revert

Revert support for a single commit
Merge pull request #1981 from jamill/download_cancel_tweaks

Updates to cancellation logic during download and indexing of packfile.
Include git2/revert.h in git2.h
Merge pull request #1982 from linquize/revert.h

Include git2/revert.h in git2.h
Bare naked merge and rebase
Merge pull request #1983 from ethomson/revert

Bare naked merge and rebase
Reorder var decls in revert test

Oh, MSVC.
Merge pull request #1984 from ethomson/revert_fix

Reorder revert test variable decls