Effects of stacking on the structural and optical properties of self-organized GaN/AlN quantum dots