Detect the ORM correctly for hierarchies.

We have a hierarchy of classes as following:
```ruby
class Shape
  include Mongoid::Document
end

class Triangle < Shape
end
```

Because `Triangle`'s direct ascendant isn't `Object`, the gem fails to detect the ORM correctly. I'm not sure what was the purpose of checking the superclass, so the PR may need some modification.