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