worktree: introduce is_shared_symref()