Branches: use API endpoints instead of submitting form
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=381720) </details> <!--IssueSummary end--> In !102644 the delete all merged branches modal was improved. This is a follow-up issue to switch from submitting form to using the [deleteMergedBranchesEndpoint](https://docs.gitlab.com/ee/api/branches.html#delete-merged-branches) Also [delete branch modal](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/branches/components/delete_branch_modal.vue) could be updated to use [this endpoint](https://docs.gitlab.com/ee/api/branches.html#delete-repository-branch)
issue