Solving bugs related to the draft state beta feature

I have explained the bug inside the issue #404. If you want I can copy/paste it here. 

I have found another bug linked to draft state: 

When you create a delayed announcement (or discussion), the notification mail is never sent to students. 

This is linked to this line in the code: 
```ruby
# announcement.rb and discussion_topic.rb, in the broadcast policy
record.context.available? and
      ((record.just_created and !(record.post_delayed? || record.unpublished?)) || record.changed_state(:active, record.draft_state_enabled? :unpublished : :post_delayed))
```

When you create a new delayed announcement, it is automatically "published", so when the application reach this line when the announcement is finally published, the workflow_state changes from post_delayed to active. But as the draft state is enabled, this line test if the workflow state changes from unpublished to active, which is not the case here. 

I suggest using rather this line of code: 

```ruby
record.context.available? and
      ((record.just_created and !(record.post_delayed? || record.unpublished?)) || record.changed_state(:active, :post_delayed) || 
        (record.draft_state_enabled? and record.changed_state(:active, :unpublished)))
```

So that it handles both cases: 
* the announcement publication is delayed and published
* the announcement is a draft and becomes published