Submit new post to discourse when post is published or updated

This will trigger a sync if the post status is published, publish to discourse is checked, whenever the post is published or updated.
It should also work for scheduled posts, but I haven't checked this yet.

NB: The function name is a little bit awkward, you might want to change it to something else.
Merge pull request #16 from surrealroad/patch-1

Submit new post to discourse when post is published or updated