Cache the current SessionModule when calling set_save_handler

When the user provides a custom SessionHandler via the function
session_set_save_handler, we need to cache the current SessionModule,
as it will be the one called by the user's SessionHandler.
Also added a check to make sure we don't call set_save_handler when
the current handler is already a user-defined one.

Differential Revision: D910794
Delete GOOGLE_HEAP_PROFILER and transitive dependencies

As far as I know we haven't used this in a while, we don't build with it
regularly, and in fact the Makefile with the commands to build with it
has been deleted since right around the fbcode transition.

It turned out to be the only thing holding LeakDetectable in the
codebase, as well as a runtime option.

We should just use jemalloc's profiling now if we need heap profiling,
and maybe a bit of valgrind too.

Differential Revision: D910760
Fast path for intermediate Elem ops when the base is an array

We can call faster helpers for intermediate m-ops when we
know the base is an array, saving us a switch-table dispatch in
Elem().  In practice this only applies to the first intermediate m-op,
because subsequent ops won't have known type.  At least for now.

Differential Revision: D903464
Fix debugger protocol break

I slipped and locked the wrong mutex on the signal polling thread with a recent diff, allowing two threads to send to the client at the same time. Fix that, and remove the other similar lock which was superflous.

Differential Revision: D911162

Blame Revision: D897309
fix recursive server rewriting

If a URL doesn't exist and is going to 404, we set `m_originalURL` to the 404 handler, but don't update the boolean to the fact that it hasn't been rewritten yet.

Differential Revision: D911365
Unrevert "Raise a recoverable error when Obj->Str conversion fails""

Differential Revision: D906304
Only enable PGO for hot functions in server mode

This seems to get JitRegionSelector=hottrace working in perflab.  I
still left all functions being profiled in non-server mode, so that we
can run tests and measure benchmarks.

Differential Revision: D908942
Revert "Fix isset($string[$k]) and empty($string[$k]) to match PHP 5.5"

Differential Revision: D911544
Revert "Fix bug in mysql_next_result's return value that confused "done" with "error""

Differential Revision: D911994
Rename runtime/base/zend_* to zend-

Incrementally renaming foo_bar.* to foo-bar.*.  runtime/vm
is nearly done, getting started on runtime/base.  This does
a dozen or so files, will do more in separate diffs.

Differential Revision: D910489
Fix a few uninit_null() sites should be regular null.

I found the one in ArrayUtil::Map while debugging the array code,
and the others are just from inspection.

Differential Revision: D906683
Fix segfault in CmdNext at request start

Request Start has no activation record on the stack, but Next is quite valid and should still work. Modified to tollerate the lack of act rec.

Differential Revision: D908499