Evolution of optimal porosity for improved hydrogen storage in templated zeolite-like carbons