Gas sorption in polyaniline powders and gas permeation in polyaniline films