reflog: follow core.logallrefupdates

On bare by default, or when core.logallrefupdates is false, we must not
write the reflog.
reflog: remove some dead code
Merge pull request #2194 from libgit2/cmn/reflog-bare

reflog: follow core.logallrefupdates