Unpublishing fixes

Data migration to fix a circular redirect, and validations to prevent this from happening again.

https://www.pivotaltracker.com/story/show/55489170
https://www.pivotaltracker.com/story/show/52623681