[profiler] Split shutdown callback into early/late callbacks.