Record changes when we set attributes directly. Also added specs for dirty tracking.
Bumping to 1.4.0.