Fix API /project/:id/branches not returning correct merge status
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24034 introduced a regression where only the first 20 branches were used to determine whether a branch has been merged because the pagination was applied incorrectly. Requesting the second page of branches via the API would always have the wrong merge status. We fix this by properly paginating the branches before requesting their merge status.