Device containing polymer having indolocarbazole-repeat unit and divalent linkage