Structural, mechanical, and electronic properties of ultrathin ZnO nanowires