18766: be a bit smarter about the preseeding of the go module cache and
the ruby gems in our docker images used for package building: make sure
to preseed with the currently checked out branch of the source tree,
not 'main'. This avoids potential compatibility issues between the
version of Ruby and certain gems.
The preseeding is worthwhile to speed up repeated package builds. When
testing on an 8 core i7-10510U:
* save ~60s on rails package build if the gems are fresh
* save ~30s on go package build if the go mods are fresh
* total gain for worst case scenario (workbench1 package) is almost 50%
(85 seconds): ~3m down to ~1m35s
Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward@curii.com>