properly detect new lines from return as being inserted

when a new line is inserted into the program, the new line that the
  cursor is now on is marked as modified and inserted
if line that the cursor was on is captured as modified if it has been
  modified
if a line is split, the line the cursor was on is captured as modified
  and the new line is marked as modified and inserted

the line changed signal now also emits the type of change (modified,
  inserted or deleted)