Correlation between threading dislocation density and the refractive index of AlN grown by molecular-beam epitaxy on Si(111)