The Boston-based education materials company formerly known as Houghton Mifflin Harcourt has cut workers, largely in Portland.