A Jazz teacher has lost his job after students boycotted classes due to his views on discrimination and diversity policies.