Sync Hack metadata with runtime

Summary: Update Hack metadata for asio extension:

- mark all final classes as final
- add all missing WaitHandle subclasses
- add all missing methods (event callbacks)

Reviewed By: @elgenie

Differential Revision: D1494191
remove l33t tests

Summary: I looked for 31337 in their tests and killed them

Reviewed By: @JoelMarcey

Differential Revision: D1497162
typechecker: Allow `foreach (X as list(...))`.

Summary: Fixes T2744848.

This patch actually allows any lvalue in the `as` position, so `as $a[0]`
typechecks as well. (HHVM accepts any lvalue as well.)

Also allows `foreach (X as $k => list(...))`.

Reviewed By: @elgenie

Differential Revision: D1486266
Add TreadHashMap support to `idx`

Reviewed By: @markw65

Differential Revision: D1496938
Better error-handling for gdb `idx`

Summary: Try to recognize when a container is empty, and also don't balk when we
encounter unknown types (so that `idx` can be used without an hhvm
binary).

Reviewed By: @jano

Differential Revision: D1497178
Support std::unordered_set for gdb `idx`

Summary: Yesssss

Reviewed By: @jano

Differential Revision: D1497183
Optimize memory allocation in removeUnreachable()

Summary: I noticed this function doing a lot of allocation while profiling
the JIT; it was using std::hash_set. Rewrote it to use a bitvector
and vectors; it's O(1) allocations now instead of O(numBlocks).

Reviewed By: @alexmalyshev

Differential Revision: D1495383
Fix a memory leak in TempFile

Summary: It seems like opening a file with fdopen() and closing it with close()
leaks the FILE structure.

Reviewed By: @ptarjan

Differential Revision: D1494494
Make loop test case do more iterations.

Summary: As of right now, pgo isn't actually picking up the backedge.

Reviewed By: @edwinsmith

Differential Revision: D1496334
Update third-party to capture folly pull
Support FixedVector in gdb `idx'

Reviewed By: @alexmalyshev

Differential Revision: D1497321
Fix printing of objects in gdb `idx'

Summary: Changes `idx` to set $# to the address of the indexed value; gdb's
object print format and object expression format are just too different.

Also fixes weirdness in the printing caused by the pretty printer.

Reviewed By: @alexmalyshev

Differential Revision: D1497325
Use print() for python3

Reviewed By: @alexmalyshev

Differential Revision: D1498114
Fix regression on OS X introduced by b53a42309061876adf275c82ff87df3981fe1bf2

Summary: OS X has some issues with __attribute__((weak)), see http://glandium.org/blog/?p=2764 for more information.
Closes https://github.com/facebook/hhvm/pull/3398

Reviewed By: @ptarjan

Differential Revision: D1484825Pulled By: @sgolemon
Updated the zf2 tests to 2.3.2

Summary: The test are at `97.01%` passing.
Closes https://github.com/facebook/hhvm/pull/3455

Reviewed By: @fredemmott

Differential Revision: D1494811Pulled By: svcscm
up all the ftp timeouts

Summary: We should really be trying as much as possible and let the test runner time us out instead

Reviewed By: @JoelMarcey

Differential Revision: D1495421
Updated fastroute tests to v0.2.0

Summary: This uncovers some issues:
```
1) FastRoute\Dispatcher\MarkBasedTest::testFoundDispatches with data set #2 ('GET', '/user/rdlowrey', Closure$FastRoute\Dispatcher\DispatcherTest::provideFoundDispatchCases;434883760#3, 'handler2', array('rdlowrey'))

RUN TEST FILE:  cd /root/hhvm/hphp/test/frameworks/framework_downloads/fastroute && /root/hhvm/hphp/test/frameworks/../../hhvm/hhvm -v Repo.Local.Mode=-- -v Repo.Central.Path=/tmp/framework-testqIDsQM --config /root/hhvm/hphp/test/frameworks/php.ini -c /root/hhvm/hphp/test/frameworks/.generated.php.ini /root/hhvm/hphp/test/frameworks/vendor/bin/phpunit --debug  -c /root/hhvm/hphp/test/frameworks/framework_downloads/fastroute/phpunit.xml --filter 'FastRoute\\Dispatcher\\MarkBasedTest::testFoundDispatches with data set #2'

array_keys() expects parameter 1 to be an array or collection

/root/hhvm/hphp/test/frameworks/framework_downloads/fastroute/src/Dispatcher/MarkBased.php:46
/root/hhvm/hphp/test/frameworks/framework_downloads/fastroute/src/Dispatcher/Mark
Closes https://github.com/facebook/hhvm/pull/3428

Reviewed By: @fredemmott

Differential Revision: D1489994Pulled By: svcscm
Updated html5php framework tests to 2.0.0

Summary: We're still at `100%` passing tests.
Closes https://github.com/facebook/hhvm/pull/3382

Reviewed By: @fredemmott

Differential Revision: D1488848Pulled By: svcscm
Removed trailing whitespace from the test run file

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

Reviewed By: @fredemmott

Differential Revision: D1488927Pulled By: svcscm
Imagick IMGTYPE_PALETTE

Summary: Fixes #3303.

I double checked the PHP documentation and it seems that this is the only constant that hasn't been defined in the HHVM implementation.
Closes https://github.com/facebook/hhvm/pull/3429

Reviewed By: @fredemmott

Differential Revision: D1490366Pulled By: svcscm