Fixes the secret token generation on an existing blog.

Moves the code to Admin:BaseController, cleans duplicate code.
Fixes issue #142.
Fixes a bug where already published articles publication date would be changed by autosave.

This issue was caused because editing an existing article creates a draft with a parent id so the existing article doesn't get updated with autosave before the user clicks on publish. The autosave mechanisme didn't check for an existing parent_id before updating the published_at field.

I wonder how I can add tests to this, any feedback appreciated.
Solves issue #141.