Electrochemical studies of semiconducting polymers: correlation of energetics and stability