From Zimbabwe to Nigeria, politicians are using the courts to shut down dissent, trading tanks and coups for lawsuits and constitutional loopholes.