Fix stale git statuses (#27735)

Display of git statuses in the git panel, project panel, and tabs
regressed in #27391, causing us to frequently see stale statuses. This
turns out to be because we were not emitting the
`WorktreeUpdatedGitRepositories` event in cases where we should be,
which in turn is because of bumping the `LocalRepositoryEntry`'s
`status_scan_id` too early, so that a later comparison of two
`status_scan_id` values wasn't detecting a change that we're expecting
it to detect.

Release Notes:

- N/A (problematic behavior didn't make it into stable or preview)
9f8776d1afCole Miller committed on 3/30/2025, 2:50:09 AM· committed by GitHubparent548a8d7
1 file changedLine totals unavailable