Nanoporous MoS2 monolayer as a promising membrane for purifying hydrogen and enriching methane