Context manager used by TextBuffer.tmp_cursor()
This allows syntax like:
with buffer.tmp_cursor(iter): # some manipulation using iter as cursor position # old cursor position restored
Basically it keeps a mark for the old cursor and restores it after exiting the context.