Electrically activated thin film optical coatings as functional layers in electrochromic devices