BUG: core: allow scalar type richcompare to call ndarray-subclass methods

This makes the scalar richcmp behave exactly as
"array(self) <op> other". The difference comes in when "other" is an ndarray
subclass, in which case this change allows the subclass to override the
comparison operations via usual Python binop dispatch rules.
Merge pull request #4711 from pv/scalar-richcmp-fix

BUG: core: allow scalar type richcompare to call ndarray-subclass methods