Synthesis, spectroelectrochemistry and application in electrochromic devices of an n- and p-dopable conducting polymer