Synthesis and characterization of poly(amideimide)s from 4-(p-carboxyphenoxy)phthalic anhydride and 4-(p-carboxybenzoyl)phthalic anhydride