magit-save-buffers-predicate-tree-only: bugfix

This function might end up being called outside a repository (because it
is used carelessly, see next branch for a better approach) so we have to
make sure it does not try anything stupid in that case.  Fixes #1499.
Merge branch 'master' into next

Conflicts:
	magit.el

Merge fix to code with no longer exist on 'next',
i.e. drop their side
magit-section-goto-successsor-1: bugfix

Fixes #1477.
magit-refresh-goto-char: new function

Add new function `magit-goto-char' intended to be used during
refreshes only, and use it in `magit-section-goto-successor'
and `magit-rebase-process-sentinel'.

This is a reactionary change reverting the separation of church and
state, I mean `point' and `window-point'.  This is necessary because
a refresh always affects the status buffer even if it is not current.

What we are doing here is the simplest fix for the issue this is
causing; there are other, more complicated approaches possible.
magit-process-finish: bind message search correctly

Limit the search for the error message to the section of the current
section, as intended.  Fixes #1498.
Merge branch 'master' into next

Conflicts:
	magit.el
define string-prefix-p for older Emacsen

Fixes #1500.
define string-suffix-p for older Emacsen

An earlier commit defined `string-prefix-p' but that is not the
function which didn't exist until 24.4, `string-suffix-p' is.
magit-delete-branch: do not create master branch

Fixes #1501.
Merge branch 'master' into next

Conflicts:
	magit.el
magit-rev-name: new function

Use it in `magit-insert-rebase-sequence' to improve the revision names
displayed in the heading.  Always display "<NAME> onto <ONTO>", try to
display NAME as a branch name and ONTO as "NAME~<N>".
magit-rev-branch: new function

Use it in `magit-get-previous-branch', which previously used
`magit-get-shortname' and therefor also returned non-branches.
magit-get-previous-branch: try harder

Do not abort prematurely when there is still hope
of finding a suitable branch earlier in the reflog.
magit-insert-rebase-merge-sequence: new function

Create `magit-insert-rebase-merge-sequence' from code previously
in `magit-insert-rebase-sequence'.  We do this for symmetry with
`magit-insert-rebase-apply-sequence'.
reorder branch and HEAD faces

This prepares for the next commit, making the diff for that more
meaningful.
improve display of refnames

* Use "@" instead of "HEAD".
* Do not display "@" in the "Head:" header of the summary buffer,
  that would be redundant.
* In refs buffers when comparing the current branch use the face
  `magit-head' for the "@" marker.  Otherwise when "#" marks some
  other branch use `magit-tag' (sic).
* Change appearance of face `magit-head', be default it now inherits
  from `magit-branch-local' and doesn't make any changes.
* When "@" and the name of the current branch appear together
  only display the name but using the new face `magit-branch-current'.
magit-server-visit{,-args}: drop TYPE, rearrange

The TYPE is unused, drop it.  Move TOPDIR before OTHER-WINDOW.
magit-insert-tags: reverse order
make width of count column in refs buffers customizable
magit-insert-branch: use magit-rev-diff-count