Thanks to Erdogan, the country no longer has the tools or institutions to tackle long-standing threats.