The Logic of Cooperation in Autocracies