Skip useless memset() when copying a bitmap
shaper: add FriBidi error handling

It is unlikely, but FriBidi might not process a string correctly,
and we should handle that. Tested by making it fail always. This
should also fix some compiler warnings.
Merge pull request #102 from grigorig/fribidi-errorhandle

shaper: add FriBidi error handling
Minor refactor as preparation for LayoutResX/Y

Reduces the diff for the next commit. No functional changes.
Implement LayoutResX/LayoutResY

This allows ASS scripts to be independent from video resolution.
Do font supersampling the VSFilter way

To avoid jerking when font size scale is animated caused by grid
fitting, we intentionally request an overly large font size from
FreeType and downscale the outline afterwards.

Currently this large font size is fixed at 256.
This commit changes it to 64 times the actual wanted font size,
which is what is used by VSFilter. The advantages are:
  * Compatibility with VSFilter.
  * Support for font hinting, even if at 64 times the size.
    Knowing this coefficient, scripts can compensate
    for it by correspondingly decreasing \fs values.

This improves upon commits 7af7801 and c207000.

The drawback is that jerking is reintroduced when an mplayer
window with libass EOSD is resized. Jerking could be avoided
by scaling \fscx and \fscy instead of \fs. Pro: this would make
the exact look of the font completely resolution-independent.
Con: this would play badly with font hinting. In any case,
this commit makes no attempt to do this.

ensure_font_size, unused since 7af7801, is removed in favor of
clipping the font size just before passing it to FreeType, as
discussed in issue #46. The mysterious height*2 check is dropped.
Scale \fscx/\fscy instead of \fs from storage to display resolution

This prevents jerking on media player window resize.