Fix HTML output of \gg, \ll and \ne (bug #9372)

The fix consists of three parts: The fix for \ll and \gg, the needed
infrastructure to assign HTML entities to global math macros, and the actual
fix for \ne and \neq.