Remember list of tempfile for %edit
Remember list of tempfile for %edit

Should fix #9002, still need tests.
There might be a better fix which would be to "mark" the %edit-ed file
code as interactively defined in `In[x]`, though it would likely
conflict with the fact that `In[x]` actually contain `%edit <foo>`

ipython/ipython,ipython/ipython