Turkish President Recep Tayyip Erdogan has suggested Turkey could hold a referendum over whether to continue its long-stalled accession process to join the European Union.