Outgoing PM Recep Tayyip Erdogan has hailed his victory in Turkey's first direct presidential election as a new era for the country.