documentcloud/backbone — pull request #1675 by stegrams (2012-09-24 23:04:40+00:00)
Title: Fix #1478 #1664 revamp set and change methods

The main idea was to simplify ```set``` by concentrating various types of info (changes, pending and silent) in one place, an attribute queue (which later became a stack but kept the name), a simple array with unique items.
The task of ```change``` is now to commit only items in a static clone of queue because every new item in the original queue will be result of silent nested ```set```s so ```change``` has no need for arguments (options.changes are preserved for compatibility reasons only).

```model.changed``` and ```_previousAttributes``` are generated via special methods when necessary and the generation of ```_previousAttributes``` is depended on queue contents.

This version passes all previous tests (plus two additional for each issue respectively) except of [this one](https://github.com/documentcloud/backbone/blob/33cdab412eb3e7597697cedbad2241895dc61068/test/model.js#L734) for which I expressed my considerations (#1478) about the repetition of the same value in successive calls of the change event.