magit-emacsclient-executable: also look for emacsclientNN.N
magit-success-executable: fix doc-string

This has to be an executable, a shell built-in
won't do because we don't actually use a shell.
magit-list-repos*: bugfix

Fix a bug introduced in 482de8051cbb0bba6e9f6bd533097cc7bbdeb7ad.
magit-list-repos*: ignore hidden files
improve magit-read-top-dir and its minions

* make `magit-list-repos' useful on its own
* rename `magit-list-repos-remove-conflicts' to
  magit-list-repos-uniquify'
* when uniquifying, _append_ containing directories
* ignore hidden directories
* cleanup
magit-commit-reword: use magit-diff-while-amending
magit-with-emacsclient: always use pop-to-buffer as server-window

* Add the constant `magit-server-window', replacing the options
  `magit-server-window-for-commit' and `magit-server-window-for-rebase'.

  We now support showing "the relevant diff" when committing and when
  rebasing (and in some other cases), but that only works reliably when
  we know where files opened by emacsclient show up.  Otherwise the
  buffer opened on behalf of the emacsclient might use the window in
  which we just displayed the diff.

  So we cannot have user change this.  Actually users who really really
  wants to, can still do so by setting `magit-server-window', *after*
  loading `magit.el'.

* Also change how the value of `server-window' is temporarily set to
  that of `magit-server-window'.

  Previously we used a timer in `magit-with-emacsclient' but that was
  not reliable.  Now we advice `server-switch-buffer' to use the local
  value of `server-window' in the buffer which is about to be displayed
  on behalf of the emacsclient.  Additionally we have to actually set
  that local value.  We do so by adding the new `magit-server-visit'
  function to `server-visit-hook'.  That function sets the local value
  to that of `magit-server-window' if the `buffer-file-name' matches
  the regexp `magit-server-window-filename-regexp'.

  That probably sounds rather complicated, but the old approach wasn't
  exactly straightforward either.  And additionally the latter was not
  reliable.
remove magit-use-emacsclient-p and magit-assert-emacsclient
magit-with-emacsclient: add ENVVAR argument
add magit-with-editor and magit-with-git-editor

Split `magit-with-emacsclient' into two new macros `magit-with-editor'
and `magit-with-git-editor'.  For now only use the latter, which still
sets $GIT_EDITOR by default.  `magit-with-editor' sets $EDITOR instead
and can be used by other packages that need to use the emacsclient.
To make that easier these macros and related things will be split into
a new library.
split magit-commit-kludge from magit-commit-internal

`magit-commit-internal' contains the things that would otherwise have to
be duplicated.  It is now freed from having to accommodate the creation
of annotated tags. `magit-commit-fallback' contains the things that we
only need because the emacsclient does not work over tramp.
Merge branch 'n/cleanup-emacsclient' into next