git: Prevent trying to find a git repository for every file in a directory

Instead just cache the failure, this also means that we don't use
the weakref value dict anymore and instead rely on the window's
focus-in-event handler to clear all the cache. This allows a user
to come back into gedit and for all of the repositories to be
rediscovered, who know maybe the user ran `git init`.
git: Avoid caching the repo all the way up to the workdir every time

This could be expensive on a repository with deeply nested
directories.
git: Fix typo in debug() comment
git: Only return a repo for a location in the .git dir when explicitly allowed

This prevents every caller from needing to check if the location is
in the repo's .git directory. This also fixes a few places that we were
not doing this check before which caused various odd behaviors.
Also, add a debug message if we try to determine the status of a
location in the .git directory, before this patch it was possible
and would cause a warning.
git: Add a debug message if we fail to monitor a directory

Also, only catch GLib.Error, not all exceptions as it could cause
an exception like SystemExit to be ignored.
git: Don't warn when the file browser becomes disabled

If the file browser became disabled it was possible that we would
try to send a message to the now unregistered file browser. This
would then generate a warning for each and every file node.
git: Add helpers to get the view activatable
git: Correctly update the view activatable

Don't just rediff the repository's contents when the focus is
returned to the window and update the view when the file
monitor emits a changed event for the location. Finally,
disable the file monitors when the window loses focus and
then do a full update when it returns. This prevents us
from doing pointless updates and allows us to react to git
commands made while the window didn't have focus.