Doping and planar defects in the formation of single-crystal ZnO nanorings