Try to keep cursor and scroll in place on refresh

When the file is saving, the cursor position was resetting to the top and you should keep
scrolling by hand every time you save the file.

This patch saves the scroll and cursor position and set it again after the file is refreshed so
we can continue edition from where we were.
Move main code inside Editor class

Before open a new file now we cleanup the Editor, so the new file get the cursor
on the first character.
Merge pull request #553 from Gazer/editor_improvements

Keep cursor position on save