Skip VMRegAnchor for arGetContextClass
Remove a few friend declarations in Unit

For MetaHandle: a member class's member function counts as a
member of the containing class, so it has access to privates already.
The friend for the other direction appears unused.
Fix BaseS class pointer burnin.

Fix TranslatorX64::emitBaseS() to only burn in a class pointer for
unique classes, and only when in repo-authoritative mode.
Support (but raise warnings) for array casts for collections

I noticed that doing an array cast ("(array)$x") on a collection will
produce an empty array (because collections currently use the default
object->array conversion and collections don't have properties).

This diff makes array casts for collections produce the same result as the
toArray() method. Array casts for collections will also raise a warning
(depending on runtime options).
Support turning off IR's use of InterpOne when JIT will translate it

Remove unused IR function HhbcTranslator::emitUnaryArith
Add option to have the IR punt this trace back to the jit rather than
doing an InterpOne for a bytecode to get more sensible perf numbers.
Get HHIR working with type prediction and pass more static info to HHIR

Type prediction was disabed with HHIR.  Enable it by passing the
predicted (or inferred) types to HHIR.

This diff also passes extra static analysis knowledge to HHIR:
- whether this pointer is available
- whether UnboxR is a no-op
Fix tread_hash_map's allocation to be the correct size
Don't create a GenericContinuation subclass for each continuation

A subclass of GenericContinuation is created for each
generator function in code we emit. This was originally intended to be
an optimization to allow burning in Func*s in the translation of
FPushContFunc, but that was not a noticeable win in perflab and tricky
to get right in sandbox mode (see the attached task). This diff
changes the emitter and runtime to not generate all these subclasses,
instead just using MethodContinuation and FunctionContinuation to
allow some specialization at translation time.
Remove dead class LfuTableSharedStore

This is one of the available APC SharedStore implementations,
but its not enabled at all and the docs (circa 2010) refer to
it as buggy/experimental.
Add translator support for objects in Iter{Init,Next,Key,ValueC}.

Enhance the translator to support object iteration in
Iter{Init,Next,Key,ValueC}.
Increase StringData size limit to 2GB (2^31-2).

This diff simply increases the string size limit, and cleans
up a handful of places we used int when we should have used
uint32_t anyway. This clears the way for a followup, which makes
limits StringBuffer to the same length limit as StringData.

We use 2^31-2 because the real limit is 2^31-1 (biggest unsigned
value for a signed-int length), but we want to safeguard against
the likelihood of client code computing size()+1 into a signed-int32
and wrapping.
smart_malloc treatment for StringBuffer

StringBuffer only has a few use cases which require it to
either attach to malloc'd memory or produce malloc'd memory
that the client later free's.  This diff refactors those clients
so all StringBuffer-created strings can be smart-malloc'd.

string_cplus_escape() used StringBuffer internally but all callers
work fine (ne better) with std::string.  Changed MemFile and
UrlFile to use a plain String (instead of char* ptr) to avoid having
StringBuffer return a plain char* buffer.

Created CstrBuffer to handle the use case of creating a plain
malloc'd char* buffer, for dynamic_content_cache and
static_content_cache; this seemed like the least-tricky solution
and those were the only use cases for the StringBuffer(char*,int)
and StringBuffer(char* filename) constructors.

With those changes, we only need the StringBuffer(int size)
constructor and it only produces ordinary Strings.  so we have
a privat StringData instance which holds the string memory,
then we finalize it in detach().

I also renamed StringBuffer's fields to match terminology we
already use in StringData.  (size or len = valid bytes of string,
cap or capacity = usable bytes of underlying memory buffer).
Exploit type info in array helpers.

This is a somewhat weak optimization that pushes some type
dispatch on keys into translation-time. It's easy to do, and looks like
it might be good for 1% or so; it's in the noise, though, so take it with
a grain of salt.
Bugfix: Need to 0-terminate in CstrBuffer.data() and detach()