Light-induced reversal of ion segregation in mixed-halide perovskites