Optimize dependency installation in CI builds

Rely on the Gemfile.lock dependency graph. Install dependencies with parallel workers. Retry Bundler network requests that fail.