[#51622237]Revert "Disable memory heuristics code"

This reverts commit 48ed37aee5015193d8bc7b7d57e8cee5085087f5.
Cope when $MEMORY_LIMIT is not set

Although we expect Cloud Foundry ultimately to set $MEMORY_LIMIT
whenever it drives a build pack, it never sets this today.

Also, if we encounter a scenario in the field where $MEMORY_LIMIT is
not set, then it is better not to fail.

If $MEMORY_LIMIT is not set, record a nil memory limit and add
suitable guards so the memory heuristics only default the stack size
and preserve any specified memory sizes.

[#51622237]
Merge 51622237- to master

[Completes #51622237]