Turkish president heads to Germany for talks