Sol-gel processing of titanium-containing thin coatings