cotire 1.6.4

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

Reviewed By: @ptarjan

Differential Revision: D1435738
unset another cached variable for dwarf detection

Summary: We're not actually broken right now because of the way we fall-back to
dwarf_producer_init_c, but a function exists check is still being
skipped due to CMake caching. That could potentially confuse things
if/when another init function were to be added in the future.
Closes #3200
Created from: https://github.com/facebook/hhvm/pull/3200

Reviewed By: @ptarjan

Differential Revision: D1438631
Fix CMake to install hh_client and hh_server

Summary: Make sure we install under bin/ the hack binaries.
Closes #3192
Closes #3158
Created from: https://github.com/facebook/hhvm/pull/3192

Reviewed By: @jwatzman

Differential Revision: D1435736
Reorganize and refactor Unit

Summary: This is partway towards having less monolithic and more documented Unit
code.  The rest of the cleanup is imminent, but it was starting to get
out of control in scope and I wanted to get this much in first to avoid
conflicts.

Notable changes include:

- Clean up and document all of Unit's methods.  Also do some easy
  refactoring, delete some undefined functions, and privatize some
  things that aren't used publicly.

- Kill Unit::m_cache{Offset,Mask}, which were always zero and never
  mutated.

- Refactor the code copypasta'd between LitstrTable and Unit into
  NamedEntityPairTable, and move the global NamedEntityMap into
  named-entity.h.  This untangles the dependency between LitstrTable and
  Unit and also slays villainous duplication.

- Remove the m_litstrs vector of StringData*'s from LitstrTable; it is
  redundant with the first component of m_namedInfo, the vector of NEPs.
  This is the only real functionality change included in this diff.

- Move UnitEmitter and UnitRepoProxy to unit-emitter.h---though we're
  currently relying on unit.h for all our includes.  This will be fixed.

Reviewed By: @alexmalyshev

Differential Revision: D1440780
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