Second- and First-Order Phase Transitions in the Magnetic Reorientation of Ultrathin Fe on Gd