Preparation of novel pyridine-based, thermally stable poly(ether imide)s