Synthesis of a polyamide containing an azo group in the polymer chain