Design of beam optics for RF-separated kaon and antiproton beams in the M2 beam line of the CERN North Area Home