Revealing latent stochastic dynamics from neuronal spiking patterns