Add a ResourceExceededException parent for timeout and OOM

Summary: Makes it easier to catch them together.

Reviewed By: @markw65

Differential Revision: D1514062
Don't swallow timeouts and OOMs from userland callbacks

Summary: Namely, __toString() in exceptions and exception_handler() callbacks
called from exception-delaying contexts.

Reviewed By: @markw65

Differential Revision: D1505603
Don't swallow ResourceExceededExceptions if {,un}serialization fails

Summary: This is probably a good idea.

Reviewed By: @markw65

Differential Revision: D1509475
Check surprise flags when unserializing arrays and objects

Summary: The allocation of a single unserialize can potentially be massive, so
let's throw an OOM before we allocate the whole thing instead of after.

Reviewed By: @markw65

Differential Revision: D1511806
cleanup unneeded ini binding

Summary: Remove more duplicated and unneeded ini bindings.

Reviewed By: @ptarjan

Differential Revision: D1331547
Use std, boost, and folly instead of smart containers.

Summary: Using the smart-allocator based containers has a marginal
speed win (5-7% faster jit time than jemalloc), but consumes
memory that contributes to the current request's allocation budget,
which isn't fair.

It's probably better to optimize allocation in the JIT by using Arena,
small_vector, vector::reserve(), etc.

Reviewed By: @ottoni

Differential Revision: D1147885
Use memcpy instead of mempcpy

Summary: Non-GNU platforms don't support mempcpy. As the return value isn't being used
here, memcpy can safely be used instead.
Closes https://github.com/facebook/hhvm/pull/3572

Reviewed By: @sgolemon

Differential Revision: D1517085
Fix casting to wrong type.

Summary: hhvm/hphp/runtime/ext/gd/libgd/gd_webp.cpp:75:10: error: cast from pointer to smaller type 'unsigned int' loses information
                temp = (unsigned uint8*) gdRealloc(filedata, size+GD_WEBP_ALLOC_STEP);
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Closes https://github.com/facebook/hhvm/pull/3573

Reviewed By: @sgolemon

Differential Revision: D1517087
Use pkg-config to find libmemcached

Summary: libmemcached-0.28 requires linking with an additional library (-lmemcachedutil).  Simplify the cmake code and pick up that additional dependency at the same time by using pkg-config.
Closes https://github.com/facebook/hhvm/pull/3591

Reviewed By: @sgolemon

Differential Revision: D1517441
Rename some things from unserialization-OOM commit

Summary: Names are nice.

Reviewed By: @jasone

Differential Revision: D1517664
Convert more print statements in the gdb .py files to run under python 3...

Summary: ....

This follows:
  https://github.com/facebook/hhvm/commit/fa214a8f475a66ab66fa2778af4019e7a298499c
This addresses issue:
  https://github.com/facebook/hhvm/issues/3448
Closes https://github.com/facebook/hhvm/pull/3569

Reviewed By: @ptarjan

Differential Revision: D1517079

Pulled By: @sgolemon
Move var_dump() to HNI, kill off variable.idl.json

Summary: Note that this modifies xdebug code-coverage behavior.

Our xdebug implementation doesn't profile IDL based
builtins, but it does happily profile HNI based ones.

It *should* profile all IDL based functions,
so that'll have to be fixed in a followup,
but for now I've re-recorded the effected xdebug tests
to provide the correct results.

Reviewed By: @ptarjan

Differential Revision: D1515818
HNI Tidy up

Summary: Tidy ups the last two HNI conversions by removing them from the IDL include file (ext.h) and moving mail parse into its own folder.
Closes https://github.com/facebook/hhvm/pull/3557

Reviewed By: @ptarjan

Differential Revision: D1514878
make socket_create_listen slightly less horrible

Reviewed By: @JoelMarcey

Differential Revision: D1517871
Package version bump

Summary: I'm guessing the next release is 3.3.0.
Closes https://github.com/facebook/hhvm/pull/3568

Reviewed By: @sgolemon

Differential Revision: D1517029
Represent type sources as a union of IRInstruction* and SSATmp*.

Summary: We currently use an SSATmp* to represent a type source, and if it's a
FramePtr then we treat it as a guard, otherwise we treat it as a
value. This is awkward because we chase FramePtr values to find the
appropriate guard for a local, when we could just have tracked the
correct guard in the first place. That and we would like to remove
FramePtr dests from {Guard,Check,Assert}Loc.

Reviewed By: @swtaarrs

Differential Revision: D1517845