Make configured_tree a caching global function

This implements the changes suggested in tpope/fugitive#415.
s:repo_configured_tree is now a global, s:configured_tree() that caches
the bidirectional relation between the worktree and the git_dir.
extract_git_dir() now uses that relation to check whether the
directories it scans are valid worktrees known by the repo at $GIT_DIR.

Note: I left s:configured_tree() in the same location for sanity of diffing.  It may/may not be desirable to relocate it a bit now that it's no longer a repo method.