Add more sanitizations to cmap and TT font programs

Fixes <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=843558">bug 843558</a>.

GDI requires that not only the final endCode but also the final startCode is 0xFFFF.
Also, if the invalid hints are present and HWA is enabled, italic glyphs were not rendered.