Move our "minimal versions" code to a script.

Previously this code was in .gitlab-ci.yml, but for the purposes of
testing my fix for #275, it turned out to be much better to have it
in a script of its own.

Also, we now need to update our "quote" second-order dependency,
since otherwise our minimal first-order dependencies won't build
5 jobs for minimize_deps in 19 minutes and 44 seconds (queued for 3 seconds)