A possible fix for https://github.com/ETHZLET/moodle-qtype_matrix/issues/18 and https://github.com/ETHZLET/moodle-qtype_matrix/issues/11
Now when a question is edited, the rows and columns are not deleted and then re-created, but rather if they exist then they will simply be updated, based on their order (first row old -> first row new, same for columns). If new items are added then they are created from scratch.