magit-init: translate ~ for the benefit of `git init'

Apparently `git init' doesn't understand what "~" means.
Employ a translator.  Close #1264.
magit-process-kill: new command
magit-toplevel: new function
magit-no-commit-p: doc-string cosmetics
magit-git-repo-p: remove function

This function was problematic because it was very similar to some
related functions but at the same time rather different.  It also
sounded like it did the same as `git rev-parse --resolve-git-dir'
but actually did something very different.  It was also used only
once, so to avoid confusion, remove it.
magit-anything-{*}-p: add FILES argument and doc-string
magit-file-uptodate-p: remove function

It's name doesn't say what it does and it doesn't have a doc-string.
Furthermore it is no longer needed.
magit-bare-repo-p: move definition
magit-inside-{gitdir,worktree}-p: new functions
magit-diff-with-mark: default to commit at point

if possible, else current branch.
magit-get-current-branch: return unambiguous shortname

Previously we got the full ref and then manually removed the
"refs/heads/" prefix.  Now we pass `--short' to `git symbolic-ref',
just like `magit-get-refname' used to.  Remove that now.  Also remove
`magit-get-ref' which got the full ref and was only used in the old
version of `magit-get-current-branch' so that it could do it wrong.

This function now returns "head/master" instead of "master", iff
e.g. refs/tags/master also exists.  That's a good thing, it's what
git would do.
magit-get-previous-branch: make sure it's not the same as current

Because @{-1} refers to the previously checked *branch* the previous
branch would be the same branch as the *current* branch when detaching
HEAD and then going back to the same branch.  So we how keep increasing
@{-N} until there are no more branches or we find another branch.
magit-section-lineage: move definition
magit-show-only-files{-all}: remove commands

Remove `magit-show-only-files' and `magit-show-only-files-all',
because what they do _not_ "show only files".  They show level 1
except when the mode is `magit-status-mode', in which case they
show level 2, just like `magit-show-level-{1 resp. 2}{,-all}' do.

So keep the effect by the key bindings the appropriate and
properly named and documented commands.  I.e. bind "M-h"/"M-H"
to `magit-show-level-1{,-all}' in `magit-mode-map' and
to `magit-show-level-2{,-all}' in `magit-status-mode-map'.
magit-show-level{,*}: rename functions

Rename `magit-show-level' to `magit-show-level*' and
Rename `magit-section-show-level' to `magit-show-level'.

Loose the doc-strings (see next commit) and move the order of the
two definitions.
magit-show-level*: remove bogus condition

What does `magit-no-commit-p' have to do with hiding/showing sections?!
magit-show-level-{1,2,3,4}{,-all}: define using defun

Remove the macros `magit-define-level-shower-1{,-all}' that were
previously used to define these commands.  That makes the code 14 lines
longer, oh the horror.  On the other hand this allows using handcrafted
doc-strings that are better than the generated crap used before.  There
are times when a define macro makes sense, here it was just an
unnecessary complication that saved us a handful of lines.
Merge branch 'master' into next

Conflicts:
	magit.el
magit-reflog-enable: new function
magit.el: absorb magit-wip.el