Fix callback circular dependency issue.

This commit includes changes to the `ActiveRecord::Callbacks#destroy`
method so that it only executes the associated callbacks once.

Prior to this commit a circular `dependent: :destroy` would result in a
stacktrace.
e.g.

```ruby
class Content < ActiveRecord::Base
  has_one :content_position, dependent: :destroy
end

class ContentPosition < ActiveRecord::Base
  belongs_to :content, dependent: :destroy
end
```

However this commit introduces a guard which prevents subsequent calls
to `run_callbacks(:destroy)` on a single instance.

This solution comes out of a discussion between @zetter,
@daniel-rikowski and I[1].

[1] https://github.com/rails/rails/issues/13609
Ensure destroy callback is set to false.

This builds upon the solution outlined in the previous commit.

Prior to this commit destroy callbacks would only be run the first time
you attempted to destroy an object, which does not cater for the case
when a call to destroy fails.

This commit addresses this issue, so that destroy callbacks will be
triggered on subsequent calls to `destroy`.