Polymeric and mixed matrix polyimide membranes