Resolve issue #7902: Bugs: Division by scalar should use enable_if<>

- This is almost identical to the fix used on #6511: Bugs: Division
  by scalar should use enable_if<> (closed: fixed)
- Also renamed the equal_to() function in testhelper.hpp to compare_to() to avoid name conflict in gcc-4.4.7 compiler.