sorting must be deactivated when adding items

when sorting is enabled, sometimes items dissapear once you add
them. The doc on QTableWidget says the same thing and that sorting
should be deactivated when adding items.

However, when reactivating sorting, QTableWidget triggers a
sortingChanged event with a column that does not exist. So I put
a small hack in place to check if the column exists before saving it.