Synthesis, characterization and thermal degradation of 8-hydroxyquinoline–guanidine–formaldehyde terpolymer