Turkey’s president, Recep Tayyip Erdoğan, has suffered his biggest setback in 13 years of amassing power as voters denied his ruling party a parliamentary majority for the first time since 2002 and gave the country’s large Kurdish minority its biggest voice ever in national politics.