Transition Between Exciton-Polariton and Coherent Photonic Lasing in All-Inorganic Perovskite Microcuboid