Disable flaky zend test

Summary: Depends on timing.  I don't know how this can fail to run in <1
second, but it did on my diff.

Reviewed By: @ptarjan

Differential Revision: D1477602
Mark OSS tests as skipped if there's any infra issues

Summary: These fail when there's internet conenctivity issues. Given they fail in large batches a retry doesn't seem like a worthwhile approach (as each framework is effecitvely a retry for downloading phpunit).

Also, removed __FILE__ from the error message as it always said utils.php :p

Reviewed By: @ptarjan

Differential Revision: D1476671
Free each function's ProfTransRec after optimizing it

Summary: And don't allocate a ProfTransRec for non-profiling translations.

Reviewed By: @bertmaher

Differential Revision: D1477165
cmake installations should no longer put files in hphp and now put them in hhvm

Summary: When installing hhvm all the lib files should now be in lib.../hhvm rather than lib.../hphp.

Reviewed By: @ptarjan

Differential Revision: D1477442
Stop doing sketchy guard optimization in pushStLoc

Summary: I feel this optimization has always been a little dodgy, but it hasn't
bitten us until we started trying to jit loops.

The high-level overview is that the loosened guards resulting from
passing DataTypeGeneric here cause breakage when it happens inside a
loop, if the truth value of the condition the loop is guarding changes
inside the loop.

Reviewed By: @swtaarrs

Differential Revision: D1473217
Implement RecursiveCallbackFilterIterator

Summary: Fixes #1894
Closes https://github.com/facebook/hhvm/pull/3350

Reviewed By: @LiraNuna

Differential Revision: D1475169

Pulled By: svcscm
Fix out-of-tree builds rebuilding too much

Summary: This fixes out-of-tree builds rebuilding things that are already built.  I believe this was missing from 3f3ee1aab336d2194ca79871810e6abdbdf5717b
Closes https://github.com/facebook/hhvm/pull/3354

Reviewed By: @LiraNuna

Differential Revision: D1475785

Pulled By: svcscm
Add cygwin to ifdef blocks

Summary: | data |Several places that are already checking for apple need to also check for cygwin, since the workarounds (such as turning off jit or disabling some elfwriter code) are the same for both OS's

Some of these may need to be expanded even more - it may be helpful in the future to define a "linux" for
not apple, not bsd, not windows in cygwin, mingw, or msvc flavors to avoid really convoluted ifdef lines

Reviewed By: @JoelMarcey

Differential Revision: D1464299
Windows header fun

Summary: Windows headers are not well behaved

VOID
STRICT
ERROR

are all defined - this finds the places where they clash and undefs them if necessary after the includes (sigh)

also fixes a header included twice that was making lint angry

Reviewed By: @JoelMarcey

Differential Revision: D1459782
Add locking for each test

Summary: We've talked about problems when the same test is run many times in parallel. In repo mode it is almost certainly going to fail. Adding file level locking should solve this problem.

In my incredibly unscientific tests, this doesn't add any extra time over not having it. 1 minute 8 seconds average over 10 runs with and without it.

Reviewed By: @markw65

Differential Revision: D1474426
Fix parser infinite loop in xhp_format

Summary: We need to look for `Teof`.

Reviewed By: @joelbeales

Differential Revision: D1478814
Cygwin compile fixes

Summary: Small fixes and workaround for compiling on cygwin

mainly missing symbols, using windows apis for functionality, and a few workarounds for C library differences
such as MAX and isinf, isnan (which are all easily available in c++)

Reviewed By: @sgolemon

Differential Revision: D1414208
Fixing OSS Bug #3130

Summary: An interaction between the simplifier, guard relaxation, and member instructions
was causing a Str to be relaxed to a Cell despite a ConcatStrStr consuming the
string.

Reviewed By: @swtaarrs

Differential Revision: D1467017
remove intermediate files when test passes

Summary: Having these files around takes ~20 gigs on a full repo test run. When the test passes or is skipped, having them around doesn't seems useful.

Reviewed By: @sgolemon

Differential Revision: D1452961
Manual sync with zend tests
Update third-party submodule
Testfiles are supposed to end with a newline

Summary: PHP's tests are supposed to end with newline. This diff corrects the importer as well as does a full reimport.
This fixes 44 bad tests.

Closes #3174

Reviewed By: @fredemmott

Differential Revision: D1475395
Implement RecursiveTreeIterator

Summary: Used mostly php-src to build this.

Some function change the error handling to exceptions. I didn't include that due to problems in the runtime restoring them

These functions are
 * __construct
 * getEntry
Closes https://github.com/facebook/hhvm/pull/3365

Reviewed By: @LiraNuna

Differential Revision: D1478696

Pulled By: svcscm
These gzseek tests step on each other

Reviewed By: @swtaarrs

Differential Revision: D1479866
Improved Zend compatibility in the reflection API.

Summary: Make sure `ReflectionFunctionAbstract` can be extended by implementing only `__toString()`.

NOTE: This was part of #3070, but was accidentally left behind.
Closes https://github.com/facebook/hhvm/pull/3361

Reviewed By: @LiraNuna

Differential Revision: D1478507

Pulled By: svcscm