Halide Segregation and Photoelectrochemical Degradation in Halide Perovskite Materials and Devices