Implement belongsTo dirty tracking

A bit more complete belongsTo dirty tracking. WIP because I need to write tests but just wanted to get it out there first.