Add revert_to_published method.

STUD-1860

OK, @dmitchell has patiently helped me through writing this method. Please review, @dmitchell and @nasthagiri.
Hmmm, perhaps I was wrong about adding the definition to the Base class as that will make this test succeed for any "write" modulestore whether it impls the method or not and it's also what required you to put the NotIMplmented version in base.py.