Space-group determination from powder diffraction data: a probabilistic approach