Water purification using heat pumps