Fix Autocomplete damaging incremental mode

Summary: This fixes the behavior of oldify and revive when we have nothing stored at a key.

-If we try to revive on a key than has no old value, we should remove the current value.
-If we try to oldify something that has no value, we should remove the current old value.

Also added missing cache removal when we revive.

I'm not completely sold on relying on revive/oldify for autocomplete/other tools functionality in general. It might be more maintainable (but slower... doesn't seem like the perf hit here would really matter though) to take the classes/funcs out of shared memory and store them when we start, and then put them back when we're done, rather than relying on the good versions being 'one step back' in shared memory.

Reviewed By: @pikatchu

Differential Revision: D1458889
update hhvm-third-party hash to latest
update third-party hash after folly cmake hack to fix build
EZC: fix crash due to EG(exception) being transmitted between requests

Summary: When an exception was thrown from EZC, EG(exception) was left holding a
reference to the smart-allocated exception object, even after the end of
the request. At the end of the request, the object storage was freed by
resetAllocator(), then when zend_wrap_func() was entered in the next
request, EG(exception) would be freed again, causing a crash.

Fixed by installing request event handlers. The requestInit() handler is
analogous to Zend's init_executor().

Closes https://github.com/facebook/hhvm/pull/3121

Reviewed By: ptarjan, joelm

Differential Revision: D1435383

Pulled By: @swtaarrs
Implemented xdebug profiling

Summary: Collecting profiling was implemented in D1423763, enabling/disabling it was
implemented in D1438290, this implements writing the collected profiling info
to a cachegrind compatible file.

The cachegrind file (at least the xdebug version) describes function calls,
function call files, function call time, and function call line #'s.

Programs that read this format (such as kcachegrind, qcachegrind, etc) can
use the generated files to get pretty graphs:
https://www.facebook.com/pxlcld/lqww
https://www.facebook.com/pxlcld/lqwz

One major difference between php5 xdebug and this is that only certain builtin
functions will be collected by the profiler. This is very unfortunate as
profiling builtin function calls would definitely be useful to the user, but
there isn't an obvious fix to this. The profilers plug into
the runtime via event hooks, which are not called for builtin function begin/end
events. Adding this wouldn't be simple because the event hook function begin/end
methods assume an ActRec is generated, which is not true for builtins.
Depends on D1438290.

Reviewed By: @ptarjan

Differential Revision: D1448800
Allow debugger to attach to more classes of requests

Summary: Specifically any request sent with a document root never had
its sandbox setup.  This patch feels like a bit of a hack, but with
just these two lines i can attach to and debug live fcgi request
that i could not without it.

Closes https://github.com/facebook/hhvm/pull/3276

Reviewed By: @ptarjan

Differential Revision: D1457845

Pulled By: svcscm
OS X fixes

Summary: These commits allow compiling HHVM on OS X 10.9 with its native clang compiler.

This also requires https://github.com/facebook/hhvm/pull/3159, https://github.com/facebook/folly/issues/75 and https://github.com/hhvm/hhvm-third-party/issues/18.

CMake config:
```bash
cmake .. \
    -DLIBIBERTY_LIB=$(brew --prefix binutilsfb)/lib/x86_64/libiberty.a \
    -DLIBEVENT_LIB=$(brew --prefix libevent)/lib/libevent.dylib \
    -DLIBEVENT_INCLUDE_DIR=$(brew --prefix libevent)/include \
    -DICU_INCLUDE_DIR=$(brew --prefix icu4c)/include \
    -DICU_LIBRARY=$(brew --prefix icu4c)/lib/libicuuc.dylib \
    -DICU_I18N_LIBRARY=$(brew --prefix icu4c)/lib/libicui18n.dylib \
    -DICU_DATA_LIBRARY=$(brew --prefix icu4c)/lib/libicudata.dylib \
    -DREADLINE_INCLUDE_DIR=$(brew --prefix readline)/include \
    -DREADLINE_LIBRARY=$(brew --prefix readline)/lib/libreadline.dylib \
    -DCURL_INCLUDE_DIR=$(brew --prefix curl)/include \
    -DCURL_LIBRARY=$(brew --prefix curl)/lib/libcurl.dylib \
    -DBOOST_INCLUDE

Closes https://github.com/facebook/hhvm/pull/3182

Reviewed By: @ptarjan

Differential Revision: D1432897

Pulled By: svcscm
Remove unused return type from jmpcond helpers

Summary: That's it.

Reviewed By: @ottoni

Differential Revision: D1457867
Update some HHI files

Summary: Could really do with a false-able type ;)

Closes https://github.com/facebook/hhvm/pull/3283

Reviewed By: @JoelMarcey

Differential Revision: D1460376

Pulled By: svcscm
Changed CRYPT_BLOWFISH to 1 because apparently it is available

Summary: CRYPT_BLOWFISH is set to 0 in HHVM. PHP's documentation states that it is set to 1 where blowfish is available in `crypt`.

Blowfish support is available in HHVM since 4a23fdc0dc804c9a5fa8bc84f9016c1d44597afb so the constant should be set to 1.

Fixes #3274

Closes https://github.com/facebook/hhvm/pull/3284

Reviewed By: @JoelMarcey

Differential Revision: D1460377

Pulled By: svcscm
Add sort_flags to ArrayObject::asort

Summary: PHP's documentation doesn't say anything about this. But they test against it and it works.

Closes https://github.com/facebook/hhvm/pull/3278

Reviewed By: @ptarjan

Differential Revision: D1458888

Pulled By: svcscm
Put msarray/miarray warnings behind a runtime option

Reviewed By: @edwinsmith

Differential Revision: D1447713
class requirements: raise error if missing lookupClass

Summary: ... a bit more error resilient on the *second* use of a class with a missing requirement.

Reviewed By: @jdelong

Differential Revision: D1440884
Rename snappy methods

Summary: Renames sncompress to snappy_compress and snuncompress to snappy_uncompress to maintain code compatibility with PHP (when using php-snappy):

https://code.google.com/p/php-snappy/

Fixes compatibility specifically with:
https://github.com/colinmollenhour/Cm_Cache_Backend_Redis/blob/master/Cm/Cache/Backend/Redis.php#L857

Replaces old PR due to incorrect commit message

Closes https://github.com/facebook/hhvm/pull/3259

Reviewed By: ptarjan, joelm

Differential Revision: D1452331

Pulled By: svcscm
Implemented basic xdebug tracing

Summary: This diff implements xdebug tracing, but does not include support for
outputting HTML or computerized tracing formats. Those will come next.

Xdebug tracing is a feature that, after started, collects information
about function begin/end events and then writes the information to
a nicely formatted file. It can be started and stopped on demand.

An example is below:
    TRACE START [2014-07-25 04:21:58]
        0.0079     248240      +32       -> var_dump() /home/jlreyes/tests/xdebug_tracing/trace.php:4
        0.0080     248192      -48     -> xdebug_get_tracefile_name() /home/jlreyes/tests/xdebug_tracing/trace.php:7
        0.0080     248272      +80     -> var_dump() /home/jlreyes/tests/xdebug_tracing/trace.php:7
        0.0087     249792    +1520     -> require(/home/jlreyes/tests/xdebug_tracing/trace_helper.php) /home/jlreyes/tests/xdebug_tracing/trace.php:8
        0.0087     249792       +0       -> bee() /home/jlreyes/tests/xdebug_tracing/trace_helper.php:7
        0.0087     249160     -632     -> Foo->bar() /home/jlreyes/tests/xdebug_tracing/trace.php:25
        0.0088     249208      +48       -> Foo->bar() /home/jlreyes/tests/xdebug_tracing/trace.php:13
        0.0088     249256      +48         -> Foo->bar() /home/jlreyes/tests/xdebug_tracing/trace.php:13
        0.0088     249304      +48           -> Foo->bar() /home/jlreyes/tests/xdebug_tracing/trace.php:13
        0.0088     249344      +40             -> baz() /home/jlreyes/tests/xdebug_tracing/trace.php:12
        0.0089     249344       +0               -> boo() /home/jlreyes/tests/xdebug_tracing/trace.php:18
        0.0089     249344       +0               -> boo() /home/jlreyes/tests/xdebug_tracing/trace.php:18
        0.0089     249344       +0               -> boo() /home/jlreyes/tests/xdebug_tracing/trace.php:19
        0.0090     249056     -288     -> boo() /home/jlreyes/tests/xdebug_tracing/trace.php:26
        0.0090     249056       +0     -> bee() /home/jlreyes/tests/xdebug_tracing/trace.php:27
        0.0090     249104      +48     -> xdebug_stop_trace() /home/jlreyes/tests/xdebug_tracing/trace.php:29
        0.0090     249136
    TRACE END   [2014-07-25 04:21:58]

There are several small consistency changes that are included in this
diff, such as ensuring variables related to the frame buffer are the
same type (int64_t).

Reviewed By: @ptarjan

Differential Revision: D1457916
typo

Summary: Closes https://github.com/facebook/hhvm/pull/3287

Reviewed By: @JoelMarcey

Differential Revision: D1460695

Pulled By: svcscm
fix parser with bison 3

Reviewed By: @Jo-Con-El

Differential Revision: D1460649