Sons or Daughters? Endogenous Sex Preferences and the Reversal of the Gender Educational Gap