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