Canada on Wednesday became the first major world economy to legalize recreational marijuana, beginning a national experiment that will alter the country’s social, cultural and economic fabric, and present the nation with its biggest public policy challenge in decades.