ArrayIterator casted to array should result to the storage array

ArrayIterator was not correctly casted to array. This diff corrects the issue by overriding the array conversion method.

Fixes #2214

Reviewed By: @ptarjan

Differential Revision: D1270947
hhi sync

Updates from www

Reviewed By: @elgenie
Improve behavior when serializing unserializable builtin classes

Instead of serializing an object of some unrelated type,
serialize a null.  The old way had a dynamic property telling you
which type you messed up with, but this is not nearly as useful as a
stacktrace at serialize time, as the code doing the serialization is
generally going to be the code making the error.  "Null" is also going
to make this easier to deal with for private property inference---if
we've determined that a private property has any object type,
currently either it is going to be nullable or one of the collection
types (which are known to be serializable).  Presumably the old dummy
continuation method was also easier for private property inference
because dummy continuations derived from Continuation?

Reviewed By: @jano

Differential Revision: D1274152
Remove a default on an arch() switch

Noticed while grepping not_implemented() sites.

Reviewed By: @jasone

Differential Revision: D1274907
Small fixes so hhbbc doesn't assert-fail some cases with malformed classes

I realized I was assuming there must be at least one
ClassInfo for the context class here, but that's not true if the class
is malformed enough that we decided it would always fatal to define
it.  This also means another always_assert about unique classes was
too strong (but earlier it was useful for debugging), so remove that.

Reviewed By: @jano

Differential Revision: D1274285
Allow NativeFuncCaller to handle up to 32 args regardless of type

Since we're hard-coding knowledge of the ABI into the JIT
anyway, might as well teach interp mode how to take advantage of it.

The AMD64/ARMv8 ABIs don't actually care about the specific order
of INT/SSE args with relation to one another up to the stack frontier.

Take advantage of this by reordering the first 8 double args to the start
of the function call and autoboxing all remaining doubles to ints so that
we only have to create fcall typedefs for arbitrary numbers of INT args.

For functions which take more than 8 doubles, but fewer than 6(or 8 on ARM)
INT args, we pad GPargs with nulls to land the extra SSEs on the stack.

This drops our complexity from O(2^N) to O(M*N)
M == Number of SIMD registers (8 for both amd64 and ARMv8)
N == Maximum number of args, type irrelevant (arbitrarily set to 32)

Build time (on my box) for native.cpp has dropped to ~15s

There are no longer any templates (recursive or otherwise) left in native.cpp

I expect this to be a slight perf regression for interp mode,
since we're pushing args into intermediate vectors,
but since basically every global function is now FCallBuiltin
capable, it shouldn't effect those in JIT mode.

JIT calls to HNI object methods may see a perf hit, but that's
something I'll be able to win back by making them eligible
for FCallBuiltin in a followup diff.

Reviewed By: @edwinsmith

Differential Revision: D1263316
Fixed a few spelling mistakes

Closes #2447

Reviewed By: @gabelevi

Differential Revision: D1274822

Pulled By: @jwatzman
Fix bugs in instrJumpOffset, make check_func.cpp more friendly to new argtypes

instrJumpOffset was using unmangled arg type names, so it
would use the enum values and continue to compile if you forgot to add
a new define.  Also remove a default so check_func.cpp fails to
compile with new arg types, instead of failing assertions at runtime.

Reviewed By: @edwinsmith

Differential Revision: D1274392