Dynamic Simulations of the Electrodialysis Process as Energy Buffer for Polygeneration Systems