The deal, expected to close by the fourth quarter, comes after a long streak of Massachusetts-based companies inking agreements to be acquired in the first six months of 2021.