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.
It's because in the instanceMethods, the args are unshifted with: `this[def.idAttribute] || this` so if a fix needs to happen, it needs to happen there too.