First principle calculations on electronic, magnetic and optical properties of Mn doped and N co-doped CdS