More accurate cost attribution for stacks.  Fixes #7818.

Previously, stacks were always attributed to CCCS_SYSTEM.  Now, we
attribute them to the CCS when the stack was allocated.  If a stack
grows, new stack chunks inherit the CCS of the old stack.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>