Collection integration test output

Previously, integration tests (i.e. the tests that were run using
Open3.popen3) did not have their output governed by the :show_output
flag the way the other tests did.  In addition, turning the
:show_output flag on for a test could potentially cause the test to
fail if it needed to examine the output for some value.  This was
because collection and console output were mutually exclusive.

This change fixes both issues.  First, output is now tee'd into the
stdout and stderr StringIO streams and optionally the STDOUT and
STDERR streams as well depending on the :show_output flag.  An
integration_helper was also introduced that encapsulated the behaviors
for starting, running, capturing the output of, and returning the exit
status of integration tests.
Merge branch 'popen-output'
Code climate improvements to Spring Insight framework

[#59478422]
Refactor DownloadCache

While refactoring DownloadCache to reduce its complexity, the
following bugs were observed and fixed:

* Bad response codes were ignored [#61019884]

* Download file size was not checked [#61534840]

* Cache reads were serialised [#61212414]

The following helper classes were factored out:

1. FileCache

The file cache handles persistence of data, etag, and last modified
timestamp. It ensures that mutation operations are performed under an
exclusive lock and that read operations are performed under a shared
lock or an exclusive lock.

2. InternetAvailability

This class encapsulates whether or not the internet has been checked
and whether or not it is deemed to be available. Internet availability
may be statically configured in config/cache.yml.

3. BuildpackStash

The buildpack stash is another name for the read-only buildpack cache,
which the class encapsulates.

Acknowledgement

Thanks to Steve Powell for reveiwing the code and identifying some
documentation improvements and the need to check the cache again once
the exclusive lock is obtained (to avoid multiple processes
downloading the same file in short succession).

[#59478422]
Merge 59478422-code-climate to master

[Completes #59478422]