The embattled California city has negotiated a deal to exit bankruptcy without neglecting its obligations to the state's public employee retirement system, avoiding a $1.6 billion termination fee.