BayesMallows: Bayesian Preference Learning with the Mallows Rank Model