Recep Tayip Erdogan used to be a fairly competent strategist, but he has been in power too long and he has lost the plot.