Turkish President Recep Tayyip Erdoğan has dismissed a senior adviser as part of a broader strategy to mend diplomatic relations with Azerbaijan.