refactor(plugin.nested_dirty): changes the way original data is generated.

Also does a little refactoring and cleanup
refactor(plugin.nested_dirty): switches to angular.equals function instead of custom equality
refactor(plugin.nested_dirty): improves $restore, makes only restore changed values.

Also makes restore use copy to support full object changes
feat(plugin.nested_dirty): adds support for properties
feat(plugin.nested_dirty): specifies how changing a nested object property
to another type affects changed property list.