Overlap fermions, improved cooling and the lattice index theorem