[base] Build outlines in amortized constant time.

When resizing the loader's points and contours, resize them to at least 1.5
times their current size.  The code currently only reserves as much space as
is currently required, leading to O(n^2) runtime when adding points one at a
time.

This change does not attempt to ever shrink the loader's point and contour
storage since this was not attempted previously either.  The 1.5 multiple
was chosen as a trade-off between potentially unused space and the runtime.

* src/base/ftgloader.c (FT_GlyphLoader_CheckPoints): Implement it.

Fixes #1173.
1 file changed