Sweden's top court has ruled there were legal obstacles to extraditing two Turks that Ankara says are part of a terrorist group.