Structure dependence of photochromism and thermochromism of azobenzene-functionalized polythiophenes