Raise informative error when non-object m2o comparison used
An informative error message is raised when an ORM many-to-one comparison
is attempted against an object that is not an actual mapped instance.
Comparisons such as those to scalar subqueries aren't supported;
generalized comparison with subqueries is better achieved using
:meth:`~.RelationshipProperty.Comparator.has`.
Fixes: #5269
Change-Id: I2e23178eb59728c39241a46bfa7411239a87492e
(cherry picked from commit
430ce5eab26d46301ae741f9068f13ba09907d8e)