Turkish president accepts resignation of PM Davutoglu