Remove zend test from both good/ and bad/ when importing

Summary: @bertmaher encountered a bug when he imported a few flaky tests. This corrects the bug

Reviewed By: @ptarjan

Differential Revision: D1469208
Add --install-only option to hphp/test/frameworks/run.php

Summary: Facebook: I'm going to use the existing runner to download + install frameworks for perf testing

Reviewed By: @JoelMarcey

Differential Revision: D1465084
Track HWINST for requests

Summary: This makes it available via the admin server, so easier to track in abirtrary (non-FB) projects. I'm not sure why we currently track this for PSP, but not the request itself.

Reviewed By: @swtaarrs

Differential Revision: D1467431
Add parser support for miarray and msarray and corresponding bytecodes

Summary: Add parser support for `miarray(...)` and `msarray(...)` which forces ##k => v##
initialization in the parser itself.

Introduces ##NewIntMapArray## and ##NewStrMapArray## bytecodes for `miarray` and
`msarray` respectively.

Reviewed By: @paroski

Differential Revision: D1451993
Support "return;" in generators

Summary: When FB originally built generators for HPHPc way back in the
day, we used `yield break;` to exit from a generator. When PHP picked up
the feature, they just used `return;` -- so return with no value is
legal in a generator (but returning a value is of course not). The
typechecker should understand this behavior.

Reviewed By: @jano

Differential Revision: D1467566
Fix isset on classes extending ArrayObject

Summary: Only ArrayObject::offsetExists should get special treatment.
X::offsetExists, where X extends ArrayObject, and overrides offsetExists
should just trust the result.

Closes #3309
Closes #3315

Reviewed By: @ptarjan

Differential Revision: D1467894
Fixes for Redis extension and associated test suite

Summary: * Fix a couple of tests that were broken by 91b1918 adding two lines to the
  wrong expect file (list.php.expect instead of info.php.expect).
* Fixed hphp/test/slow/ext_redis/watch.php.expect to expect the correct
  behavior. (Tested by verifying with Zend + phpredis.)
* Make the key prefix set by the test suite include the md5 of the file path
  plus UNIX timestamp representing the test suite initialization. This makes
  the tests not break when the path exceeds the redis key length limit and it
  makes repeated test runs not conflict with one another.
* Make Redis::sRandMember apply the key prefix (if one exists).
* Make Redis::get() and Redis::h{m}get() return false rather than null for
  missing keys or fields, matching the behavior of phpredis.

Minimal test case for the false / null behavior:

    <?php
    $redis = new Redis;
    $redis->connect("localhost");
    var_dump($redis->get("nonexistent-key"));
    $redis->hMset('ice_cream', array('flavor' => 'vanilla'));
    var_dump($redi

Closes https://github.com/facebook/hhvm/pull/3318

Reviewed By: bsimmers, ptarjan

Differential Revision: D1467674

Pulled By: svcscm
Implement a basic version of first-class enums in Hack.

Summary: Implement a basic version of first-class enums in Hack. They allow the declaration of enums with a specified underlying type that all of the constants are checked against. The actual type of all of the constants, however, is the name of the enum. Specifying 'as typ' after the enum name will cause the enum to be treated as a subtype of typ (typ must be a supertype of underlying type).

Reviewed By: @jwatzman

Differential Revision: D1428116
Use GNUInstallDirs.cmake

Summary: I don't know if GNU install dirs (e.g. lib64 instead of lib) would be preferred, but here's a PR for changing the install behavior if it is. Thoughts?

Note: This was originally based on HHVM-3.2 branch as [PR #3272](https://github.com/facebook/hhvm/pull/3272)

Closes https://github.com/facebook/hhvm/pull/3323

Reviewed By: ptarjan, kdm

Differential Revision: D1469517

Pulled By: svcscm
Add HHVM hookups for folly::Singleton

Summary: Originally this was part of D1404231, but split out when that
diff was reverted to allow the public folly repo to catch up with the
internal one.

This also converts the AsyncMysql library to use folly::Singleton
instead of a Meyers singleton.

Reviewed By: akhi

Differential Revision: D1457868
typechecker: typing new static() [1/2]

Summary: Adds a boolean to constructor type to track compatibility and
 cleans up surrounding code. This boolean is not yet being used in
 anger to enforce "descendants of this class must have compatible
 __construct declarations", but that's the purpose.

Reviewed By: @jwatzman

Differential Revision: D1466609
More flaky failures

Summary: disable flaky tests

Reviewed By: @ptarjan

Differential Revision: D1469323
use third-party sqlite3 if pkg-config reports version 3.8.5 installed

Summary: - not sure of the actual incompatibility, but HHVM fails to initialize the central repository with sqlite3 version 3.8.5

Closes https://github.com/facebook/hhvm/pull/3270

Reviewed By: @ptarjan

Differential Revision: D1455370

Pulled By: svcscm
Add skipped tests to the result set

Summary: Closes https://github.com/facebook/hhvm/pull/3333

Reviewed By: @LiraNuna

Differential Revision: D1470614

Pulled By: svcscm
use cmake variable to set linker flags

Summary: Putting static linking in C(XX) flags is total overkill, and CMake
provides a nice variable for these kinds of linker flags.

Closes https://github.com/facebook/hhvm/pull/3311

Reviewed By: @sgolemon

Differential Revision: D1467630

Pulled By: svcscm
Update Travis CI config so it runs ext_redis tests

Summary: * Declare a redis service, per
  <http://docs.travis-ci.com/user/database-setup/#Redis>
* Set the env var REDIS_TEST_HOST so hphp/test/slow/ext_redis/config.skipif
  doesn't skip the tests.

Closes https://github.com/facebook/hhvm/pull/3317

Reviewed By: @sgolemon

Differential Revision: D1467670

Pulled By: svcscm
Remove docs about call_user_func_async

Summary: They has been removed, remove doc about them.

Closes https://github.com/facebook/hhvm/pull/3310

Reviewed By: @sgolemon

Differential Revision: D1467623

Pulled By: svcscm
Move zend xsl test from flaky to bad

Summary: It's legitimately failing

Reviewed By: @LiraNuna

Differential Revision: D1471013
Expose extension API version in output of 'hhvm --version'

Summary: It's useful for packaging and configuration management scripts that want to
determine where dynamic extension files should be placed.

Closes https://github.com/facebook/hhvm/pull/3322

Reviewed By: sgolemon, ptarjan

Differential Revision: D1469518

Pulled By: svcscm
Flaky disk-space zend tests

Summary: Looks like these both create a disk_total_space

Reviewed By: @LiraNuna

Differential Revision: D1471055