Mock ApplicationCache instantiation

Previously, the compile_spec tests allowed an ApplicationCache to be
instantiated.  This then looked to ARGV[1] for the cache directory
which failed in some cases.  This change ensures that a mock
ApplicationCache is created and used.  It also cleans up the compile
API such that an unneeded application_cache_dir is no longer passed
around.

[#51057319]
Merge 51057319-mock-application-cache to master

[Completes #51057319]
Support stack size system property

The Java stack size may be specified using a system property. Use
a specific system property for stack size rather than opening up all
Java command line options to be specifiable.

There is no validation of the input stack size except to ensure that
it does not contain whitespace. The input stack size, if valid, is
appended to -Xss= and added to the java command line returned from
release.

Add stack size documentation to the README.

[#49694449]
Merge 49694449-thread-stack-size to master

[Completes #49694449]
Support maximum heap size system property

The Java maximum heap size may be specified using a system property.

There is no validation of the input maximum heap size except to ensure that
it does not contain whitespace. The input maximum heap size, if valid, is
appended to -Xmx= and added to the java command line returned from
release.

Add maximum heap size documentation to the README.

Name maximum heap size methods etc. heap_size_maximum given that there
is also a minimum heap size Java command line parameter. This will
make for a more logical list if methods etc. are sorted.

[#49694395]
Merge 49694395-heap-size to master

[Completes #49694395]
Correct -Xmx syntax

-Xmx does not contain an '='.

[#49694395]
Merge 49694395- to master

[Completes #49694395]
PermGen configurable with system.properties

Previously there was no way to configure the PermGen space used by a
Java process.  This change adds the ability to configure that value
using the java.runtime.perm.gen.size.maximum property in the
system.properties file.

[#49694411]
Merge 49694411-perm-gen to master

[Completes #49694411]
Remove duplicated code

Previously, Code Climate identified some duplicated code.  This has
been simplified into a function.

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

[Completes #49694411]
Introduce memory heuristics

This initial implementation of memory heuristics calculates default
maximum heap size and default permgen size based on:

* the application's memory limit as provided in an environment
  variable

* weightings configured for the buildpack in a YAML file

Validate the memory limit and the weightings.

[#49694523]
Merge 49694523-default-sizes-formula to master

[Completes #49694523]
Apply defaults when some values have been specified

Divide any excess among the unspecified values.

[#49694523]
Merge 49694523-default-sizes-formula to master

[Completes #49694523]
Support main-class applications

Previously, there was no support for Java main() class applications.
This change adds the functionality required to run these kinds of
applications.  In addition to the work required for that, the
opportunity was taken to refactor the code base to be more composable.
Specifically this includes the breaking out of JRE, container, and
framework components which are dynamically loaded and called based on
configuration.  In addition to this, the documentation was
dramatically overhauled to describe how to configure and extend the
buildpack using the new structure.

[#49693913]
Merge 49693913-main-class to master

[#49693913]
Make class loading 1.9 compatible

Previously, the strategy used to load classes was Ruby 2.0 or greater.
This change uses a different strategy, taken from Ruby on Rails, to
turn a String into a constant and then instantiates it.

[#49693913]
Merge 49693913-main-class to master

[Completes #49693913]