GetRepoRoot: fix endless loop with "fugitive:/" paths

Use `prevpath` to compare the previous path with the new parent dir. If
they are equal, abort.

This is more robust than only checking for "/", which fails
with "fugitive:/...".
GetRepoRoot: return early for fugitive buffers