Add unittest for edit_prefix return values

This makes sure the return value for edit_prefix is what it should be.
Simplify _get_updated_rows as per #416

With the improved functionality that #416 brings, we can now remove some
of the logic we had to add to _get_updated_rows to return only rows that
have been touched by an edit.

Part of #416.