allow %edit <variable> to work when interactively defined

fixes `%edit foo` for interactively defined variables
    
Effectively handles cases such as:
    
    In [1]: def foo(): return 5
    In [2]: %edit foo
    
Where `%edit foo` turns into `%edit 1` by parsing the `<ipython-input-NN-…>` fake filename.