GM avoids $1 billion stock payout as U.S. judge throws out settlement