magit-mode-refresh-buffer: don't fiddle with window point

See #1451.
magit-process-buffer: adjust the callers too
Merge branch 'master' into next

Conflicts:
	magit.el

Only code that no longer exists on 'next' was modified.
magit-branch-popup: removed unused arguments

Remove the `--merged', `, `--no-merged' and `--contains' arguments from
the `magit-branch-popup'.  This popup does not feature a "list branches"
command and these options are only meaningful with such a command.  Not
only do this options no longer serve any purpose, if a user actually
sets them and then uses one of the commands which actually respect
`magit-current-popup-args' then that results in an error.

Once upon a time these switches were used by `magit-branch-manager'
which no longer is available from this popup, and which not even exists
anymore.  Its successor `magit-show-refs' no longer supports these
arguments. It could possibly make sense to restore support for these
arguments.  If we implement that, then it should be done using a popup
`magit-show-refs-popup', with only one action `magit-show-refs'.
magit-branch{,-and-checkout}: filter --track when appropriate

Remove "--track" from `magit-current-popup-args' if the START-POINT
isn't a branch.  This happens in the new utility function
`magit-branch-read-args', which is called inside `interactive'.

Also add the new predicate `magit-branch-p'.
magit-branch-popup: enable --track by default
magit-checkout: fix doc-string
magit-section-goto-successor: new function

Split `magit-section-goto-successor' from `magit-refresh-buffer' and
rename `magit-refresh-buffer-1' to `magit-section-goto-successor-1'.
magit-refresh-buffer: do nothing if magit-refresh-function is nil

This is done to avoids unnecessary work.  But it also prevents
`magit-refresh-buffer-hook' from running, which might be a problem for
third-party code which for some reason expects this to run even if the
buffer was not actually refreshed.  If this turns out to be the case
then we could change back to always run that hook.
remove variable magit-status-line-align-to

This variable was used when padding the leading keywords of header lines
in the status buffer.  Its purpose was to allow third-party extensions
that use headers with keywords that are longer than those used in Magit,
to adjust the padding accordingly.  By removing this variable, we remove
that - so far unused - feature.  If needed this can add such a variable
again.

For why we "needlessly" do that, see the next few commits.
remove magit-insert-header, add magit-string-pad

Remove the macro `magit-insert-header', a very thin wrapper around
`magit-insert-section'.  The defining feature was that the leading
keyword was padded.  We factor out that functionality into the new
generic `magit-string-pad'.
remove magit-insert-cherry-help-lines

Once users know what `git cherry' does, they
also knows what + and - mean in this context.

Yes, we once provided some help which we now
no longer provide, we must be doing this just
to annoy users.  /prophylactic sarcasm
add variable magit-status-headers-hook

Add new hook variable `magit-status-headers-hook'.  It is run by
`magit-insert-status-headers'.  Move `magit-insert-status-tags-line'
from `magit-status-sections-hook' to `magit-status-headers-hook'.

All header sections are now children of the first header section.
This allows hiding all headers but the first.

The "Head" and "Upstream" headers are inserted outside the control
of the `magit-status-headers-hook', its not possible to not insert
them (except by removing `magit-insert-status-headers' from
`magit-status-sections-hook' which would mean that no headers are
inserted at all).
magit-locate-emacsclient: kludge for multi-arch Emacs for Mac OS X
magit-branch-and-checkout: Reorder arguments

Previously `args' was placed after the '-b' flag, resulting in an error.

    fatal: '--track' is not a valid branch name.
Merge pull request #1454 from kyleam/next

magit-branch-and-checkout: Reorder arguments
magit-branch-and-checkout: correct doc-string
magit-commit-add-log: Use symbol boundary in function name REGEXP

Use symbol boundary instead of word boundary in function name REGEXP. This is
because using word boundary causes partial function name being matched. As an
example, let's say we have two diff hunks, one in the function `foo' and the
other in `foo-bar'. When the word boundary REGEXP is used, the REGEXP matches
both function name `foo' and `foo-bar', which will prevent
`magit-commit-add-log' from adding a log entry for function `foo-bar' if an
entry for function `foo' already exist.
Add a defcustom for `magit-status-mode-hook'.

This will allow users to customize it and extension packages, such as
magit-filenotify, to use `custom-add-option' to add themselves as option
to it.
Add `magit-load-config-extensions' option to `magit-mode-hook'.

This will make it easier and more noticeable when customizing magit.