Raise an error for has_one associations which try to go :through a polymorphic association

This PR addresses the missing exception dedicated to `has_one` associations which try to go :through a polymorphic association.

Issue raised by @georgemillo in #17263.
@eileencodes: code updated & cleaned up :).

[Last build](https://travis-ci.org/rails/rails/builds/38040133) went all green.