Betting against the dollar has been the dominant trade this year in the $9.6 trillion-a-day foreign-exchange market, but the wager is starting to stumble.