That way it's assured that reads and writes don't intersect, but assure we only
hold such lock for the shortest amount of time for reads and and for the
full duration of writes.
* use `ctx` as name instead of `project_repository` to make lines shorter
and more readable. This could be done everywhere once the type-name changes
as well.
* Where possible, avoid using `&self` for `VirtualBranchActions` as there is no state.
For now I avoided to remove its usage as field in the filesystem monitor.
* Use a more modern way to use state in `tauri` commands.
* Add the `Ext` suffix to what clearly is extension traits.
Further to the move - the VirtualBranchesExt trait creates a dependency towards gitbutler-project. The gitubler-branch crate doesn't have such dependency so i deemed it undesirable to introduce it just for a convinience method.
(Separately added an extention in gitbutler-virtual-actions since it already depends on project and to create a smaller diff)
This type currently acts more or less like a command context that lives for the duration of the request. Regardless of if we wanna keep this pattern or not, separating it out helps us split up core
This protects us from cyclic dependencies. Unfortunatelly as part of this, i had to introduce the imp Project as trait implementations since now Project is foreign