Backport 2.1 gc heap growth patch

This backports the patches for the improved GC heap growth changes.

/cc @tmm1 @charliesome