The extraordinary actions by the outgoing president reflect America’s tensions as a successor takes office who has said his opponents should be jailed.