Understanding and mitigating performance decline in electrochemical deionization