Fix JSONObjectfield.value_to_string

It wasn't passing a required connection parameter. This fixes that.
Fix RecordManager.log regarding instances

If the instance is None, then RecordManager.log would throw an error.
This fixes that by selectively saving the content_object only when the
instance is not None.