Add cache adaptive code to multicore gc and add support for System.gc()