Faradaic reactions in capacitive deionization for desalination and ion separation