Defect induced ferromagnetism in luminescent and doped CdS quantum dots