Stability of ion-acoustic waves in a pair-ion plasma with a third species of ions: application to cometary plasmas