Effect of a microstructure on the formation of self-assembled laser cavities in polycrystalline ZnO