Refactor memory heuristics

Split memory heuristics into JRE specific strategies and general
utilities including MemorySize, MemoryLimit,
WeightBalancingMemoryHeuristic, MemoryBucket, and StackMemoryBucket.

MemorySize encapsulates all use of memory sizes and arithmetic on
memory sizes and enforces proper units and dimensions.

MemoryLimit encapsulates converting $MEMORY_LIMIT into a MemorySize.

WeightBalancingMemoryHeuristic, together with it helper classes
MemoryBucket and StackMemoryBucket, encapsulate the algorithm by which
unspecified memory sizes are defaulted and positive or negative excess
(in specified memory sizes) is redistributed to unspecified,
adjustable memory.

StackMemoryBucket is a special kind of MemoryBucket which is not
adjustable even it its value is not specified and which calculates its
excess based on the default stack size rather than presuming a
particular number of threads.

Create separate strategies and configurations for OpenJDK before
and after the replacement of permgen by metaspace.

Move all the above memory classes to the jre/memory directory and this
directory causing require logic to fail in buildpack.rb.

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

[Completes #49694523]