Autosave

Adds autosave for previously created posts
Adds previews for posts
Adds JS alert when leaving a page with unsaved content
Let's do

```
opts = params[:preview] == "true" ? { preview: true } : {}
redirect_to url_for([:edit, :dashboard, @post, opts]), notice: I18n.t('flash.posts.create.success')
```
to reduce the duplication in the redirect