High-throughput computational screening and design of nanoporous materials for methane storage and carbon dioxide capture