Fix Freetype to look for ft2build.h first

Summary: In the previous configuration, it would find freetype2 for me, but then fail to #include freetype.h through the macro header include.  In this configuration, it finds ft2build.h goes along happily.
Closes https://github.com/facebook/hhvm/pull/3532

Reviewed By: @ptarjan, @sgolemon

Differential Revision: D1508208
Move shape class constant typecheck from declaration to typing

Summary: The check needs to know about available classes and typedefs so
it can look into class constants and see what the typedef's underlying
type is. This means we needed to have completed declaration before doing
the shape class constant check. However, it was placed directly into
declaration itself, and so was sensitive to the order in which classes
were declared, which is nondeterministic. Instead, move it into typing,
when we know that everything has been declared and is available.

Reviewed By: @gabelevi

Differential Revision: D1512071