Magnetoelastically coupled structural, magnetic, and superconducting order parameters in BaFe_2(As_(1−x)P_x)_2