Better $old_object cloning and deleting.

 * Only clone the $old_object when it's needed.
 * Only delete the old object on edits.
 * Fix a long standing issue where the $old_object is added to the cache clearing queue after it has been updated. New code correctly clones it before it's values are modified.