Polymers responding to electrical or electrochemical stimuli for linear actuators