Obtaining Synthon Modularity in Ternary Cocrystals with Hydrogen Bonds and Halogen Bonds