Interpretation of quantum mechanics based on a consistency criterion that assigns probabilities to various alternative histories of a system