Fix #6146 (Offline editing tool broken)

Adding of features back to remote database didn't work in case of primary keys
being auto-generated. With the fix, if the user did not set any value (i.e. it is NULL),
the value will be set to provider's default (and thus use the sequence generator)