Clarify meaing of total available memory

Also note the effect of scaling an application.

[#60311680]
Set heap and permgen sizes to maximum values

Set -Xms to the same value as -Xms and -XX:PermSize to the same value
as -XX:MaxPermSize. This ensures that the committed memory for the
heap and the permanent generation does not increase during the
lifetime of the application. This should reduce the possibility of
warden killing the JVM process once the application is running.

[#59731874]
Set metaspace size to maximum value

This is to match the behaviour for permgen size.

Also document the new size matching behaviour.

[#59731874]
Split additional memory options into separate Java options

[#59731874]
Clarify Java Options Framework != JAVA_OPTS env var

[#60962662]
Clarify that user-provided New Relic services are optional

[#60934856]
Test improvements

Based on feedback from people who are extending the buildpack, the
repetitiveness of the buildpack testing was problematic.  The goals of
this change were to drastically reduce the amount of test code written
and make the code that was written more understandable.  These goals
were accomplished with a variety of strategies, but the two biggest
were the use of example metadata and shared contexts.  The example
metadata allows us to declaratively describe things like which
application fixture to use for the test, while the shared contexts
allow us to encapsulate and reuse common test behaviors.

[#59911894]
Fix failure

This change fixes a test that was incorrectly refactored in the last
group of changes.

[#59911894]
Another test fix

This change fixes the final failing test.

[#59911894]
Sorting out Gemfile

This change is another attempt to sort out the Gemfile/debug/Ruby 2.0
interaction.

[#59911894]
Prefer FileUtils over shell

This change replaces as many of the calls to shell for file
manipulations (e.g. cp, mv, rm) with FileUtils as is possible.

[#59117282]
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.
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]