Add VectorFormat to unserialize a vector as map or as vector

Summary: The current code serialize vector as map. But in theory, we should serialize the vector as a vector.

This diff adds a new FB_SERIALIZE_VECTOR used for vectors.

The serialize logic now can serialize the vector as
FB_SERIALIZE_VECTOR
list of Values
FB_SERIALIZE_STOP

The unserialize logic will understand the FB_SERIALIZE_VECTOR correctly, and use createVector and vectorAppend to create the map (php doesn't have vector type so it still uses map).

To make roll out eaiser, this diff only has the unserialize part. The serialize part will be checked in after unserialize it everywhere.

Reviewed By: @andriigrynenko

Differential Revision: D1714262
Add __ParamCoerceModeFalse to various ext file functions

Summary: After the ext file HNI conversion, the return value of various file functions have been changed from false to NULL. Setting these functions' param coerce mode to false would fix the issue.

Reviewed By: @JoelMarcey

Differential Revision: D1700631
Fix Arr=Packed | BoxedInitCell.

Summary: We weren't correctly dropping the specialization, and hitting an assert when
constructing the new type.

Reviewed By: @jdelong

Differential Revision: D1721056
Make timeout flag sticky

Summary: Occasionally we see long-lived requests that fail to timeout.  What
probably happens is that the TimeoutException is generated, the timeout
surprise flag is unset, and then the exception is caught by some block that
simply drops it.  While we could keep auditing catch blocks, it seems more
reliable to simply make timeouts sticky, so that we'll re-raise the exception
at the next opportunity.

Reviewed By: @jdelong

Differential Revision: D1711487
Use heap parsing for objprof

Summary: Parsable heap means we don't need a hashtable to keep track of objects.
Change heap iteration to take a snapshot of the objects in the heap,
then iterate over them. Populating a vector of pointers is probably more
efficient than using the unordered_set for a single snapshot, but could
lose if many snapshots are taken in the same request.

Looking at the inner loop code in objprof_get_data/strings, I don't think
the snapshot cost is significant; they're converting objects to arrays,
accessing the arrays, and so on. Taking a snapshot also avoids mutating
the heap (allocating arrays, etc) while we are iterating over it.

Reviewed By: @markw65

Differential Revision: D1711579
Convert WddxPacket to use StringBuffer instead of std::string.

Summary: Convert WddxPacket to use StringBuffer instead of std::string.

Reviewed By: @edwinsmith

Differential Revision: D1714927
Allow typechecker to interpret WaitHandle result()

Summary: Avoid problems with typechecker on hhvm 3.5 version
Closes https://github.com/facebook/hhvm/pull/4405

Reviewed By: @jano

Differential Revision: D1724448

Signature: t1:1724448:1418076102:74b9fc566f8720d1493d19b568f47b98448866a2
Fix use-after-free in soap extension

Summary: Binding a StrNR to a const String& results in a dangling
reference.

Reviewed By: @swtaarrs

Differential Revision: D1725840

Signature: t1:1725840:1418075846:75cf7115c6fb2c48b81023cb9dd5bf4a1d2ff9f7
Basic support for interfaces in HHBBC subtypeOf

Reviewed By: @paroski, @elgenie

Differential Revision: D1719649

Signature: t1:1719649:1417817263:4c8ac18096750c5b553c855e0809cfd287135c45
Remove the SoftClosureReturnTypeHints runtime option (part 1)

Summary: The SoftClosureReturnTypeHints runtime option was added as a temporary
crutch while adding return type enforcement for closures. We don't need it
anymore, so let's get rid of it.

This diff removes all uses of the SoftClosureReturnTypeHints runtime option
inside HHVM, but doesn't completely remove the option because there are
still some configs that reference this option. Later, we'll completely
the option once enough time has passed to update all the relevant configs.

Reviewed By: @elgenie

Differential Revision: D1724592
Always assert a few limitations in copyTV

Summary: Seems cheap enough and could save debugging time, before we actually
support it.

Reviewed By: @jasone

Differential Revision: D1713316