avoid needlessly connecting to unrelated tramp remotes

In `magit-save-buffers-predicate-tree-only' avoid needlessly connecting
to unrelated tramp remotes by first checking whether the absolute path
to the top-level of the current directory is a prefix of
`buffer-file-name'.  Only if that is so check whether `buffer-file-name'
is actually directly in that repository (it may also be part of a
submodule or other nested repository.

Fixes #1473.

Suggested-by: Ryan C. Thompson <rct@thompsonclan.org>
avoid needlessly connecting to unrelated tramp remotes

In `magit-save-repository-buffers' avoid needlessly connecting
to unrelated tramp remotes by first checking whether the absolute
path to the top-level of the current directory is a prefix of
`buffer-file-name'.  Only if that is so check whether
`buffer-file-name' is actually directly in that repository (it
may also be part of a submodule or other nested repository).

Fixes #1473 on next.
Merge branch 'master' into next

Conflicts:
	magit.el

The two parents of this commit fix the same issue, once on master
and once on next.  Because the respective code area has previously
diverged a lot we have to fix it twice.  This merge commit keeps
the change on next and throws away the change on master.