In mysql_escape_string() use ReserveString instead of AttachString

Summary: * Use ReserveString instead of AttachString in mysql_escape_string()
  and mysql_real_escape_string(). AttachString should really be
  deprecated, since it doesn't actually attach, it just copies.
* Don't truncate the return value of the underlying C API call -- use
  unsigned long.
* Upgrade string size to size_t before doing arithmetic. Overflow is
  probably not possible in this case, but it's a good habit to get into.
* Added missing skipif.inc from PHP, so that the relevant tests would
  run.

Submitted on behalf of a third-party: The PHP Group
Source: PHP 5.7.0-dev
License: version 3.01 of the PHP license
Closes #3198
Created from: https://github.com/facebook/hhvm/pull/3198

Reviewed By: @ptarjan

Differential Revision: D1438627
freetype 2.16+

Summary: #3190
Closes #3196
Created from: https://github.com/facebook/hhvm/pull/3196

Reviewed By: @ptarjan

Differential Revision: D1438014