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_DIFF_FIND_BY_CONFIG
Implement GIT_DIFF_FIND_BY_CONFIG
Don't use weird return codes
Clarify default value and behavior
Don't clobber whitespace settings
Clarify docs
Fixed left shift size of int.

Simply switched the ordering of the checks in the for loop where this left
shift was being made.
Merge pull request #1993 from jaredlwong/development

Fixed left shift size of int.
commit: Fix potential segfault in git_commit_message

Dereferencing commit pointer before asserting
Merge pull request #1994 from palistov/commit-cleanup

commit: Fix potential segfault
reflog: write to the reflog following git's rules

git-core only writes to the reflogs of HEAD, refs/heads/ and,
refs/notes/ or if there is already a reflog in place. Adjust our code to
follow these semantics.