X-ray tracking of structural changes during a subnanosecond solid-solid phase transition in cobalt nanoparticles