BANGKOK—Thailand’s Prime Minister Prayuth Chan-ocha announced on Tuesday his retirement from politics, nine years after he took power in a military coup, and promised to stay in charge only temporarily. His announcement was widely expected after his military-backed United Thai Nation party was thumped in a May 14 election, in which it won just 36…