Phoenix officer accused of threatening Mayor Kate Gallego retires to avoid discipline