The owner of a company that makes candies such as Necco wafers and Sweethearts has unexpectedly shut down operations at its Massachusetts plant.