A comprehensive study on Co-doped CdS nanostructured films fit for optoelectronic applications