Fix regression re: #new with an STI object & complex inheritance

Test case fails on the current master branch, but works on 3-2-stable.

Calling #subclasses [here](https://github.com/rails/rails/blob/master/activerecord/lib/active_record/inheritance.rb#L177) only catches the direct children, which causes creating a new complex subclass to fail.