Rayleigh-instability-driven simultaneous morphological and compositional transformation from Co nanowires to CoO octahedra