Turkish President Recep Tayyip Erdogan has lashed out at the country's Western allies over last month's failed putsch, accusing them of supporting "terror".