Here's the patch as-applied. Note one major difference from your
original: the logic about whether an indexscan can be skipped is now
entirely local to the index AMs, rather than allowing VACUUM to make
assumptions that may not be warranted for particular AMs. For the
same reason, the AM is still responsible for providing the tuple
count statistic.
regards, tom lane