Revert "Revert "GC: Improve the string parsing for GC parameter setting""

This reverts commit 20059d50f5b48c0c1b00ce05f84219598f720a4b.