X-ray, optical and electrical study of melt grown pure and doped CdBr2, CdI2 and PbI2, single crystals