Departure coincides with Western efforts to lure Armenia, Azerbaijan’s perennial foe, away from its longstanding alliance with Moscow.