Integrating carbon capture and storage with energy production from saline aquifers