Evidence Functions and the Optimality of the Law of Likelihood