Add revert_to_published method.

STUD-1860

OK, @dmitchell has patiently helped me through writing this method. Please review, @dmitchell and @nasthagiri.
I had the signature include user_id, but in reality it is never used (no user ID is recorded for delete operations). It seems like we should want to track who made the changes. @nasthagiri, what do you think?