Global upsert option not functioning properly

The problem is that the line

`if (definition && options.upsert && attrs[definition.idAttribute]) {`

runs before

`options = DSUtils._(definition, options);`

so the options don't get merged with the global options. This is a suggested fix.
This would change the API. It should be `if (options.upsert && (DSUtils.isString(attrs[definition.idAttribute]) || DSUtils.isNumber(attrs[definition.idAttribute]))`