Fix some cppcheck warnings

Bug 77800 - cppcheck reports
[ot-font] Don't select a Null cmap subtable

Can happen either in broken fonts, or as a result of sanitize().
Move try_set to sanitize context
[ot-font] Work around broken cmap subtable format 4 length

Roboto was hitting this.  FreeType also has pretty much the
same code for this, in ttcmap.c:tt_cmap4_validate():

    /* in certain fonts, the `length' field is invalid and goes */
    /* out of bound.  We try to correct this here...            */
    if ( table + length > valid->limit )
    {
      if ( valid->level >= FT_VALIDATE_TIGHT )
        FT_INVALID_TOO_SHORT;

      length = (FT_UInt)( valid->limit - table );
    }
[ot-font] Use binary search for format12 cmap subtable
[ot-font] Fix cmap EncodingRecord cmp order