Rename stack_iterator::link() to index()

It was confusing for si.link() and si->link to mean different things.