A nonparametric latent space model for dynamic relational networks