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
mark symlink_link_linkinfo_is_link_variation4 flakey

Summary: it failed a lot. D1470540?vs=on&id=4726102&whitespace=ignore-all#toc most recently. I will land once a bellwether diff failures on it.

Reviewed By: @JoelMarcey

Differential Revision: D1480045
Reading the source code completely (until eof()) instead of a fixed number of bytes.

Summary: The code was passing the file size around and reading that number of bytes. In high-concurrency environments we were hitting partial reads, see the attached task.

Using PlainFile::read() instead, which is a `while(!eof())`.

Reviewed By: @mxw

Differential Revision: D1479572
Move libevent patch to the main hhvm repo rather than third-party

Summary: third-party should be for actual third-party code,
not code that we've written to deal with third-party code.

Also add a comment section to the top of the patch to
describe what the patch if for and how to apply it.

After this lands, I'll remove the patch from the third-party
repo in a separate commit.

Reviewed By: @ptarjan

Differential Revision: D1479360
Create HHVM man page

Summary: This will be the man page for HHVM. Needed short-term by Debian, this will
be the official man page for other distros as well.

Wrote this in Markdown (because troff is obscene) and used a converter to generate
the manpage itself.

I used `ronn`.

```
% sudo gem install ronn
% /opt/local/ruby-1.8.7/bin/ronn hhvm.md
```

This created a `hhvm.1` file.

So I don't have to deal with the insanity of troff directly, I am thinking of adding ronn (https://github.com/rtomayko/ronn) to third-party2, and then we can use the markdown file
for our source of truth for the man page.

Reviewed By: @ptarjan

Differential Revision: D1477486
better error for missing expect files

Reviewed By: @JoelMarcey

Differential Revision: D1479986
Patch for building TBB on Cygwin

Summary: TBB supports MSVC and Mingw out of the box, but not cygwin

Provides small patches (mostly related to missing dladdr/dl_info) and ifdefs missing
And integrates cygwin support into the rather odd build system

Reviewed By: @sgolemon

Differential Revision: D1480195
Add test case for __sleep when storing to APC

Summary: This feature broke in D1417525 so just adding a unit test for the
future.

Reviewed By: @asukhachev

Differential Revision: D1478391
Use blockEndsRegion for breaksTracelet

Summary: With wholecfg there can be "tracelet" breaking things that aren't the
last block.

Reviewed By: @ottoni

Differential Revision: D1460197
Don't smart-allocate anything when creating the execution context

Summary: We (re-)create the execution context at the end of every
request. If it smart allocates anything, we will end up allocating
a 2Mb slab which won't be freed (or used) until the next time
the thread executes a request. Since we typically have a lot of
idle requests, this could be a significant chunk of memory.

Reviewed By: @bertmaher

Differential Revision: D1465987
Make ProfilerLevel into enum class; give it a better name

Summary: It may have been intended as a profiling "level" originally, but it's
not that anymore. Rename, make enum class. This makes it easier to grep
for where these things are being used.

Reviewed By: @ptarjan

Differential Revision: D1478966
Add better error reporting if framework runner ran without an HHVM build

Summary: See confusion on facebook/hhvm#3320

cc GrahamCampbell

Reviewed By: @JoelMarcey

Differential Revision: D1478146
Delete SimpleProfiler

Summary: ProfilerKind::Simple was unused except for that case label, and there
was no other way to instantiate a SimpleProfiler. SimpleProfiler also
returned its results by directly writing some nasty HTML (referencing
nonexistent css and js files) to output. Everything else in this file is
more than enough to cover this functionality; let's kill it.

Reviewed By: @ptarjan

Differential Revision: D1480436
Make whitespace in reflectionparameter match php5

Summary: refs facebook/hhvm#3320

Reviewed By: @JoelMarcey

Differential Revision: D1475355