Further refactoring of MovieLibrary#average_rating.