Towards understanding the special stability of SrCoO2.5 and HSrCoO2.5