fix(daemon): limit number of git children (#9572)
### Description
This PR limits the amount of `git` child sub processes that the daemon
can start at one time so we don't flood the system with requests when
many things change e.g. a during a rebase.
### Testing Instructions
Added quick unit test to make sure we're using semaphore correctly. Did
a manual test on a big repo and confirmed that on big changes and made
sure that the number of `git` processes remain in the single digits now.