[SPARK-3170][CORE]: Bug Fix in Storage UI

current compeleted stage only need to remove its own partitions that are no longer cached. Currently, "Storage" in Spark UI may lost some rdds which are cached actually.
Actually, why is this necessary? I believe the only place where you set `metrics.updatedBlocks` is here, and for any given task this code path only executes once. Can you explain your change here?