[POC] Opt-in m2m table rename

This PR will make the new naming scheme opt-in
This is not finalized code, just a proof-of-concept for this temporary fix.
This is not to be intended as a long term solution, but just as measure to fix current develop while #2543 is implemented