Electrochemically-mediated membrane separations for carbon dioxide capture