Statistical Query Algorithms and Low-Degree Tests Are Almost Equivalent