The law of large numbers in locally convex spaces