Limit latest_successful_on_build to the merge-base
This MR introduces an optional limit to Commits#latest_successful_on_build, if the limit is provided and merge_base_limit feature flag is set, then the search for a successful build will be limited to that provided commit id (excluded).
During an auto-deploy tagging, we'll set such limit as the merge-base with master.
This will prevent gitaly downgrades
Edited by Alessio Caiazza