Fix PTL2.2 saving multiple `*-last.ckpt` checkpoints in resumed training
This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days. @stevehuang52 this problem basically happens when we try to resume 2nd time right ?  > @stevehuang52 this problem basically happens when we try to resume 2nd time right ?

@athitten  Yes, it happens when we resume for the 2nd time, the first resume is fine jenkins jenkins jenkins jenkins @athitten seems that Jenkins passed without issues. Could you please review the PR again and see if there's other changes or tests needed? Thanks~
# What does this PR do ?

Fix PTL2.2 saving multiple `*-last.ckpt` checkpoints in resumed training. 

In current PTL2.2 [model_checkpoint.py](https://github.com/Lightning-AI/pytorch-lightning/blob/master/src/lightning/pytorch/callbacks/model_checkpoint.py#L783), it doesn't delete the previous `*-last.ckpt` checkpoint that the model was resumed on when saving a new `*-last.ckpt` checkpoint, which results in multiple checkpoints. This will cause errors of "multiple *-last.ckpt checkpoints" when trying to resume from a previous job.

The fix is to check whether the checkpoint to be saved is also a `-last.ckpt` checkpoint. If it is, delete the previous `-last.ckpt` if they are under the same directory.


**PR Type**:
- [ ] New Feature
- [x] Bugfix
- [ ] Documentation


