update_submodule: fix integration branch name in case of multiple MRs
When there are multiple open merge requests for a commit, we currently take the newest one to determine the integration branch name. This is not necessarily the correct one, we can have an open merge request with the commit being part of the commit history while the top commit is a different one.
Add a check if the commit is the top commit of the merge request in order to get the correct integration branch name in these cases.