improve message for custom rspec matcher
use correct table name in sql when used w/ joins

ActiveRecord generates alias table names in SQL queries when a `joins`
method is appended to an AR query. This commit lets has_many_polymorphs
generate sql that uses the aliased table name in that situation.