A federal judge has granted certification of a nationwide class of Juul Labs consumers, dealing a second blow in the past week for the maker of electronic cigarettes.