Switch folly to using a submodule instead of a fork.

To sync the folly submodule the first time, you'll need
to issue:

git submodule init
git submodule update

From then on, you'll also want to make sure folly is up to
date by issuing `git submodule update` after a `git pull`.
Just some minor fixes to the code generator for HNI

After stubbing out ZipArchive, there were a few issues that caused complilation problems. This fixes those.

- Add a string argument to NotImplementedException
- Change CStrRef to const String&
- I think "null" should be "void" in the typemap; otherwise you get "static null HHVM_METHOD" type functions.

Reviewed By: @sgolemon

Differential Revision: D1025577
Make the JIT aware of traits implementing interfaces

Correctly populate the instanceBits of each class so that "fast path"
taken by the JIT correctly supports traits implementing interfaces.

Reviewed By: @swtaarrs

Differential Revision: D1023165
Support (de)serialization

FrozenVector now supports serialize() and unserialize().

Additionally, as a result of the above, var_dump(some_frozen_vector)
now gives a more meaningful output.

Reviewed By: @paroski

Differential Revision: D1013734
StoreImmPatcher incorrectly handles 64-bit imms

StoreImmPatcher is currently subtracting the wrong offset (not
taking into account the extra instruction emitted) when setting m_addr.

Closes #1210

Reviewed By: @markw65

Differential Revision: D1025861
Simplify the content of the test script expect files

The expect files were containing a bit too much infomration. Now they just contain name of test and status. No other data.

Also increased the timeout (mostly because of the time for pear) and tried to text align the csv output as best I could.

Some minor other changes too

@ptarjan: You should run the graph script with --csv and --csvheader ... modify the script to handle the header that comes each time we append.

Reviewed By: @ptarjan

Differential Revision: D1025044
Allow ETE receiveSome() to timeout, as receiveSomeUntil()

We want to be able to timeout waiting for external thread event
completion in order to order correctly with async sleeps.

Reviewed By: @jano

Differential Revision: D1018706
Fix jitted symbols in gdb 7.6

gdb traps calls to a function named __jit_debug_register_code,
and updates its internal symbol tables.

Apparently gdb-7.2 was prepared to demangle the name,
while gdb-7.6 is not.

Reviewed By: aravind

Differential Revision: D1026295
Tidy up the API to postorderWalk()

We always call it with the full # of blocks and the unit's
entry point, so just pass the unit.

Reviewed By: @jdelong

Differential Revision: D1026189
set m_documentRoot even if there is no hdf

This variable is entirely independent of the hdf, so it should be set even it there isn't one.

This came up when someone (me) was running `hhvm -m server` from the symphony directory trying to show it off, but PATH_INFO doesn't work unless the m_documentRoot is set. It just assumes that all files exist if there is no document root.

This shouldn't affect anything in FB since there is always a `.hdf`.

Reviewed By: @markw65

Differential Revision: D1025781
Process ready wait handles in LIFO rather than FIFO order

After eager execution, the queue of ready ContinuationWaitHandles may
contain only unblocked handles. Process the most recently unblocked first
to improve cache locality.

Reviewed By: alexsuhan

Differential Revision: D1016230
Remove incorrect assert

We assert in DOMNode::{appendChild,insertBefore} that the node that
has been passed in is an orphaned node, however it's only orphaned if
it has no parent or its parent is also orphaned.

Fixes the last fatal in yii

Reviewed By: @ptarjan

Differential Revision: D1026211
IncRef Sinking fix

An IncRef that is marked as a candidate for sinking should
be removed from the sinking list only if the corresponding DecRefNZ
is live.

Reviewed By: @ottoni

Differential Revision: D1026155
Refactor SessionScopedWaitHandle from ETEWH

Generic wait handle for async executions which are not bound by context
but rather have session scope.  Used for upcoming SleepWaitHandle.

Reviewed By: @jano

Differential Revision: D1018708
SQLite3::escapestring should be static

We had it as an instance method.

Fixes a fatal in Joomla

Reviewed By: @scannell

Differential Revision: D1026742
create a Class creation time hook

... for the purpose of adding trait-based methods to a class at PreClass-to-Class conversion time.

Reviewed By: @jdelong

Differential Revision: D1023552
Fix the timeout process in the oss framework test script

The timeout was broken, as in it didn't work. Take a new approach. Timeout per individual test in an individual framework instead.

Default is allow 60 seconds per test.

And some other fixes too.

Reviewed By: @ptarjan

Differential Revision: D1027221
fix stream_select error

I am a clown.

Reviewed By: @ptarjan

Differential Revision: D1027352
Remove unused childOfYield and hphp_continuation_done()

childOfYield flag and hphp_continuation_done internal method are no
longer used. Remove them.

Reviewed By: alexsuhan

Differential Revision: D1016610
Fix retranslateOpt bug

If we've already optimized, we want to do a regular
translation, not an optimized one

Reviewed By: @ottoni

Differential Revision: D1026773