Charge transfer and structural anomaly in stoichiometric layered perovskite Sr2Co0.5Ir0.5O4