Add revert_to_published method.

STUD-1860

OK, @dmitchell has patiently helped me through writing this method. Please review, @dmitchell and @nasthagiri.
Of course, it wouldn't hurt to check that `encoded_block_id` exists in both versions & it probably needs to recurse down the children (as a loop w/in here on new_structure).