Defect segregation and optical emission in ZnO nano- and microwires.