CO2 and CH4 Sorption by Solid-State Ammonium and Imidazolium Ionic Liquids