Refactor ForksController
### Problem
While working on https://gitlab.com/gitlab-org/gitlab/-/merge_requests/140575+ I had to touch ForksController code.
I discovered that it's in a pretty bad shape and requires some refactoring.
### Proposal
* Refactor ForksController
* Review its test suite and add missing tests
issue