deloreanjs/delorean — pull request #62 by darcyadams (2014-12-15 19:04:13+00:00)
Title: Clone scheme defaults to preserve them for later use

This simply uses the new `__clone` method to copy the defaults object while setting `scheme` attributes. This preserves the `default` value when it is an object, and allows it to be reused later to reset the scheme attribute to its default, eg..

```javascript
this.set({
mySchemeAttribute: this.scheme.mySchemeAttribute.default
});
```
Currently, the above would does nothing as `this.mySchemeAttribute` and `this.scheme.mySchemeAttribute.default` reference the same object in memory. This does not affect scheme defaults that are not objects, as `__clone` returns the the passed argument for non-object types.

I also updated the `__clone` helper function to perform a deep clone.