Make array parameter type constraints implicitly cast collections to arrays

This diff updates VerifyParamType to implicitly cast collections to arrays
for a non-soft 'array' type constraint on a parameter that is pass by value.
No cast will be performed if the parameter is pass by reference (&), or if
it is a soft type hint (@).

Reviewed By: @swtaarrs

Differential Revision: D1168347
Add comment about why we don't need to exclude closures

I was wondering, so maybe someone else reading the code might
wonder.

Reviewed By: aravind

Differential Revision: D1176268
Put dce-related code in its own module

The code relating to this will probably grow a bit, and it's
large enough to give it its own file already.

Reviewed By: aravind

Differential Revision: D1176322
Fix issues with CGetL, CGetL3, and empty blocks in local DCE

They were unbalancing the stack.  (Later diff will add better
assertions.)  It is also possible for it to make a block empty, which
is currently illegal.  Also turn it off for now (it needs more testing
and isn't measurably affecting performance right now).

Reviewed By: @edwinsmith

Differential Revision: D1177278
actually fix date_create

So, zend does the same thing for the empty string too. This was breaking wordpress.

Reviewed By: @scannell

Differential Revision: D1176022
Remove src index arguments to emitCompare[Int]

They are always the same; this removes the unnecessary generality.

Reviewed By: @jdelong

Differential Revision: D1177855
Fix eof->fwrite->feof

Fixes #1820
Part of guzzle/guzzle#538

Reviewed By: @ptarjan

Differential Revision: D1176448
Cleanup some preg stuff before fixing limit

This fixes two bugs / nits that make changing the limits hard:

* We didn't test correctly for the AtomicHashArray being full.
* Inline / kill a function that would pull the regular expression directly.

This also makes the functions return false on full cache rather than
error out.

Reviewed By: @ptarjan

Differential Revision: D1173718
Fix issues with sleep and inaccessible properties

Fix various bugs, and avoid lots of redundant work.

Closes #1565
Closes #1793

Reviewed By: @ptarjan

Differential Revision: D1176885
Dump a jemalloc pprof dump whenever a request OOMs

This extends our jemalloc dumping infrastructure to additionally dump whenever a thread OOMs assuming we have already turned on jemalloc profiling.

Reviewed By: @edwinsmith

Differential Revision: D1169375
Implement streamWrapper::stream_stat

Implement streamWrapper::stream_stat

Closes #1794

Reviewed By: @ptarjan

Differential Revision: D1173753

Pulled By: @scannell
Fix pointer overflow in fb_unserialize

Reviewed By: @edwinsmith

Differential Revision: D1178110