Improved check for internet connection

Check for an internet connection by attempting a HTTP GET with 10
second timeout of a well known buildpack download artefact. Cache
the result in a class variable so that each invocation of the
buildpack makes the test once only.

Beware known problems with timeouts (https://www.ruby-
forum.com/topic/143840), although the code uses a timeout option on
the API, so a problem would represent a bug in the Ruby HTTP code.

Transient internet connection problems can cause the buildpack to
enter "no internet" mode for the duration of a buildpack invocation,
but that can be rectified by re-staging. If transient connection
problems occur after the check for "no internet", then the read-only
buildpack is not used as a look aside. This is desirable as a full
repository index may have been downloaded while the internet was
available and this index may refer to artefacts which are not present
in the read-only buildpack cache.

Stub the above HTTP GET in spec_helper.rb so that the test run ok with
webmock.

[#54290822]
Merge 54290822-improve-internet-detection to master

[#54290822]
Fix unit test for new "no internet" behaviour

[#54290822]
Merge 54290822-improve-internet-detection to master

[#54290822]
refer to debugging gemfile in README
Merge remote-tracking branch 'upstream/master'