Working on the publishing state machine

Projects now default as unpublished and can be published or made
private. Added a publish_alert helper to generate a flash depending on
the state of the model; this needs fixing as it currently shows the
flash message twice.