Relativistic center-of-mass variables for composite systems with arbitrary internal interactions