The entry-exit function and geometric singular perturbation theory