in %edit, don't save "last_call" unless last call succeeded

avoids failing calls to `%edit` from killing future `%edit -p`

closes #2466
Merge pull request #2816 from minrk/edit_last_cell

in %edit, don't save "last_call" unless last call succeeded