Probabilistic scoring functions for mass spectrometry database search