Energy Recovery from Solutions with Different Salinities Based on Swelling and Shrinking of Hydrogels