allow mark/restore in functionscan

It's not clear that this buys us much, but it allows mergejoin
against ordinality columns to avoid a Materialize node. I did it
mainly to test how much faster the multiple-function approach was
compared to mergejoins on ordinality colums (answer: significantly
so). There's no real cost when not used, though, so leaving it in
for now.