Amazon's stunning loss of a $10 billion contract is the latest in an increasingly worrisome series of political defeats.