Unsupervised embedding of trajectories captures the latent structure of scientific migration