Fix handling of pcre overflow expressions

Summary: Couple of fixes to the handling of pcre compiled expressions that overflow the default pcre cache:

s_pcre_globals should smart-free m_overflow at the end of the request, and should free() the set of overflow expressions themselves.

Reviewed By: @markw65

Differential Revision: D1503955
Upodate idl to hni converter

Summary: We now handle variadics, paramcoercenull,
and the correct foldable flag.

Reviewed By: @JoelMarcey

Differential Revision: D1519934
Rewrite misc.idl.json to HNI

Summary: This pull request moves the functions in misc.idl.json to HNI.

Part of #1480
Closes https://github.com/facebook/hhvm/pull/3525

Reviewed By: @fredemmott

Differential Revision: D1506187

Pulled By: @sgolemon
stristr should accept before_needle parameter

Summary: fixes #3520

The third parameter of stristr is currently unsupported.

Refer to https://github.com/facebook/hhvm/issues/3520 for more information.

Reviewed By: @fredemmott

Differential Revision: D1514703
Handle exact substring matches within fuzzy search

Summary: This addresses what was mentioned here: https://www.prod.facebook.com/groups/devtools.feedback/permalink/720320464683238/

In any case where the letter expected in the exact match appeared beforehand somewhere in the string, we ignored the exact match case.  This handles that, so any time we find an exact substring match we'll score it properly.

Reviewed By: @joelbeales

Differential Revision: D1517792
Check for OOM during json decoding

Summary: json parsing can create massively big objects from relatively small
strings, so check for OOM during parsing.

Reviewed By: @markw65

Differential Revision: D1516420
Fix typos in hh_client manpage.

Summary: Typos are awful.

Reviewed By: @fredemmott

Differential Revision: D1520699
typechecker: Improve error messages for casting.

Summary: Raise semantic errors for object casts, instead of parse errors

Reviewed By: @elgenie

Differential Revision: D1513322
flakeylist socket_create_listen

Summary: This failed 8 times yesterday after my rand fix. Lets just kill it since tests without retries and binding are horrible.

Reviewed By: @fredemmott

Differential Revision: D1520240
Don't print destroyed locals with TRACE=bcinterp

Summary: Stack::toString() was printing the local values from callers, but when
we've reentered to run a destructor some of those locals might already be
destroyed.

Reviewed By: @alexmalyshev

Differential Revision: D1518133
Don't run __sleep when serializing objects for the debugger wire protocol

Summary: Running __sleep while serializing objects for the debugger can break
the protocol, e.g., if a breakpoint is hit while generating a backtrace.  It
seems doubtful that the user of the debugger actually wants to trigger __sleep
via debugger commands.

Reviewed By: @markw65

Differential Revision: D1519537
fix test

Summary: I'm so angry at you@​aravind for ruining such a good test day.

https://www.facebook.com/pxlcld/lxd9

Reviewed By: @alexmalyshev

Differential Revision: D1521427
Deprecate unset cast.

Reviewed By: @elgenie

Differential Revision: D1521372
Fix persistence bug in Class::initSPropHandle

Summary: If a parent's sPropInit handle isn't persistent, we shouldn't mark the
child's handle as persistent.

Reviewed By: @alexmalyshev, @markw65

Differential Revision: D1518812
Don't use fast object allocation path for Enums

Reviewed By: @bertmaher

Differential Revision: D1518831
Support fast object allocation path when Eval.EnableObjDestruct call is on

Summary: Pretty straightforward: we just need an extra call to insert the
object into the set of live objects.

Reviewed By: @bertmaher

Differential Revision: D1518842
Turn on Eval.EnableObjDestructCall by default

Summary: This was an intentional divergence from PHP5 for performance reasons,
but the default should be compatible. The overhead of this feature is vastly
reduced with D1462739 anyway.

Reviewed By: @ptarjan

Differential Revision: D1517757
Remove decls for rCGxxx, give them to vasm and use vasm temps instead.

Summary: Baby step towards vasm register allocation for the full unit.

Reviewed By: @alexmalyshev

Differential Revision: D1519393
Clarify error message when Hack syntax is used in a PHP file

Summary: EnableHipHopSyntax is no longer what people should probably be
enabling -- they probably want to just be using a Hack file instead.

The failure mode here can be really confusing, e.g.,
http://stackoverflow.com/questions/25496687/setting-enablehiphopsyntax-to-true-with-hhvm

Reviewed By: @elgenie

Differential Revision: D1519619
Manpage for hh_server

Summary: Debian wants these.

Reviewed By: @elgenie

Differential Revision: D1512680