Molecular and thin film properties of cobalt half-sandwich compounds for optoelectronic application