Using two‐point correlation functions to characterize microgeometry and estimate permeabilities of sandstones and porous glass