Add documentation and minor improvements to core/observe

* Provide inline documentation
* Refactor creation of change records and provide a handle to remove
  an observation function