Eagerly hash shared variant strings

Right now, we wait until the first request that needs the
hash, and it stores it back to the shared StringData.  This removes a
branch from hashHelper, but it doesn't seem to matter.

Reviewed By: @edwinsmith

Differential Revision: D970437
Remove Hack comment

Removing the Hack comment from the script

Reviewed By: @sgolemon

Differential Revision: D977342
Make sure no decRefs are evaluated during sweeping

We're trying to make sure that destruction/sweeping of extensions is implemented properly. During sweeping there should be no reference decrementing and no smart memory freeing.

Reviewed By: @jdelong

Differential Revision: D932364
Finish refactoring service requests: move code, get Asm out of interface

I moved the top-level "emitServiceReq" functions (which don't output any
code themselves) into service-requests.h so they can be shared by the
ARM backend. They will conditionally call either X64::emitServiceReqWork
or (the to-be-written) ARM::emitServiceReqWork.

Reviewed By: @jdelong

Differential Revision: D977213
Use MakePacked in bytecode.cpp instead of doing it by hand

Smith noticed this could reuse the existing creation
functions.

Reviewed By: @edwinsmith

Differential Revision: D975127
Move new failing zend stream test to bad

This looks to come from D967885.

Reviewed By: julk

Differential Revision: D978088
collections: support converting to boolean

to simplify the migration story from array(), it makes sense
 to be able to write idiomatic code like:

   $x = $foo->getCollection();
   if ($x) { // ... collection not empty }

 As opposed to the current:

   $x = $foo->getCollection();
   if (0 !== count($x)) { // ... collection not empty }

 The methodology here is very similar to what collection::ToArray does
 (including helpers around static_cast and const access).

 Failure due to broken logic www test that
 I've disabled and the zend test disabled by jdelong in {D978088}

Reviewed By: @paroski

Differential Revision: D964614
rename c_SimpleXMLElement::{ToBoolean=>ToBool} to match Collections

for great consistency. Depends on D964614.

  failure due to www test impacted by dependent commit (since fixed)

Reviewed By: @jdelong

Differential Revision: D976094
Fix guard pages for thread stacks

I noticed a couple of issues:
 - the stacksize returned by pthread_attr_getstack includes the
   guard size, so we should adjust both the start and the size
 - if you call pthread_attr_setstack, its your responsibility to
   mprotect the guard region

Reviewed By: @jdelong

Differential Revision: D976923
get_class_vars should autoload

This has been wrong for two years (and I got it wrong originally :/ ).
It also turns out that it returns false instead of fataling if the class
isn't found.

Because PHP, get_class_methods doesn't work this way, in case you were
wondering. It returns NULL on error.

Reviewed By: @ptarjan

Differential Revision: D976416