CMake fix for GCC 4.7.x

Summary: Fix GCC 4.7.x build on some platforms for the following error:
error: ‘sleep_for’ is not a member of ‘std::this_thread’

Closes #1264
make (array) of ArrayObject return the contents

I originally tried to use `o_get` but that isn't const, so I added a const version.

A side effect is `var_dump` of an ArrayObject now shows the inner array. Are we cool with that? I like it.

I also tried to move this class down to C++ but that is too much work for this.  @sgolemon is there an easy way to have the class in C++ but most of the impl in PHP?

Reviewed By: @jdelong

Differential Revision: D1041009
Streamline findForNewInsert and copy/grow loops.

Remove the inline restrictions from findForNewInsert(), and
pass in table & mask so the loads from m_tableMask and m_hash
can be hoisted out of the hashtable init loops in Grow & Copy.
Also, replace memcpy/memset with loops that operate on words
at a time. (no alignment checks, even #s of words).

Reviewed By: @jdelong

Differential Revision: D1047021
Fix build--redefinition of s_storage

Reviewed By: @edwinsmith

Differential Revision: D1050880
Fix performance of array operator+= when lhs has refcount of 1

The change to make this unconditionally allocate a new array
changes big-O behavior of user code in some situations.  Thanks to
lesha and andrewparoski for catching this.  An equivalent case for
array_merge shouldn't be possible because an inc ref always happens to
pass it to the builtin.

Reviewed By: @paroski

Differential Revision: D1046251
APC shouldn't show as loaded when disabled

This modifies get_loaded_extensions() to not show the APC
extension when Server::APC::EnableApc is false.

Closes #1103
Closes #1262

Reviewed By: @JoelMarcey

Differential Revision: D1050685

Pulled By: @scannell
Add string_data_eq_same function object

Similar to string_data_same, except uses exact equality first.

Reviewed By: @scannell

Differential Revision: D1048085
Fix an issue with methodCacheSlowerPath if Fatal == false

After we store the null Func, it was setting an invName on
the ActRec even though it's not a magic call.  It would also update
the MCE as if it were magic.  I'm not sure if this could've caused a
bug (maybe someone would treat the invName as a VarEnv, since there
should never be an invName on a non-prelive actrec?)

Reviewed By: @bertmaher

Differential Revision: D1050301
Some tweaks to conv_10

Some parameters were unused, and the length output parameter
can be sent back in a register.

Reviewed By: @edwinsmith

Differential Revision: D1050294
Update unserialize to support moving all collections to a namespace

This diff extends the approach from D1031058 so that unserialization is
both forwards/backwards compatible with migrating all collection classes
to the HH namespace.

Reviewed By: anietoro

Differential Revision: D1050299
Remove HOT_FUNC

These macros are NOPs now, due to D1046368.  Remove them entirely.

Reviewed By: @markw65

Differential Revision: D1050690
Log requests that were timed out while queuing to access.log

Previously when we timeout requests that's been sitting on the queue for too
long, we just return 503 to the client on the transport. In addition to that, we
should log the request in access.log

Reviewed By: afrind

Differential Revision: D1033156
print file name

nice to have the name of the test at least

Reviewed By: @JoelMarcey

Differential Revision: D1052179
Don't serialize Objects in ReflectionClass

Objects can change out from under this caching (dynamic properties) so this is safest. If it turns out to be perf critacl we can cut the data into cacheable and not. But then we'll have it figure out what key to use, since serializing it isn't in the contract of this class.

Reviewed By: @alexmalyshev

Differential Revision: D1051775
Create classes for the frameworks

A fairly sizeable design change. Now all frameworks are subclasses of a master abstract Framework class. This makes special casing better and easier (e.g. Pear). And it is just better code, I think, for long term maintainability.

Reviewed By: @ptarjan

Differential Revision: D1049900
Revert "Implement PDO::sqliteCreateFunction"

This reverts commit fc7fc47221308572e34e00b22d96773a1d18d051.
Was breaking open source build.

Reviewed By: @ptarjan

Differential Revision: D1052342
PDOStatement::queryString not set in all cases

PDOStatement::queryString right now is not being set when using
 the regular PDOStatement. If you use PDOStatement you don't want the
 constructor to be called, but you want queryString to be set in any
 case.

Closes #1211
Closes #1263

Reviewed By: @ptarjan

Differential Revision: D1051402

Pulled By: @scannell
rm tr1

C++11 has standardized the TR1 implementation; the latter
should now be purged.

With the deprecation of gcc-4.6, we have full C++11 support and are
capable of moving off of tr1. Further, moving to gcc-4.8 with tr1
causes some compilation issues, incentivising an immediate switch.

== How ==

  echo A | codemod --extensions h,cpp,cc,d,tcc 'std::tr1::' 'std::'
  echo A | codemod --extensions h,cpp,cc,d,tcc 'tr1::' 'std::'
  echo A | codemod --extensions h,cpp,cc,d,tcc 'include\s*<tr1/' 'include <'
  echo A | codemod --extensions h,cpp,cc,d,tcc '\s*namespace tr1 = std::tr1;\n' ''
  echo A | codemod --extensions h,cpp,cc,d,tcc '\s*using namespace tr1;\n' ''
  echo A | codemod --extensions h,cpp,cc,d,tcc 'using namespace std::tr1;' 'using namespace std;'

Performing
  ls | grep -v third-party | xargs egrep --color=auto -RIws "tr1"
yields a few non-comment results in
FacebookUpdate/windows/omaha/third_party/gtest/include/gtest/ and
facer/engine/worker/gearmand_0.11/ (seems like non-fb code), some
html (which has not been changed), ti/etc/wrapper.py (this looks like
some compatibility code), and linters/cpplint/ (which seem acceptable).

There are a few files which use tr1 legitimately. Specifically, google
value-parameterized tests require tr1::tuple, and do not work with
std::tuple. Fortunately, these are all cpp test files, not headers.
These files have had their codemod changes reverted.

tr1::functions may be initialized with NULL. std::function makes this
explicit and only allows construction from a newfangled nullptr_t. Clang
is very strict about this, so some NULLs needed to be changed to nullptrs.

== HPHP ==

Most of the non-codemod changes were to hphp. hphp needed to specialize
some hash functions in namespace std::tr1; the tr1 level has been
removed and now-duplicate definitions have been fixed.

hphp/tools/tc-print/perf-events.h makes use of std::tr1::array::assign,
which is no longer a standard function. Uses of assign have now been
replaced with fill. Of note, the arrays are of integral type, and so
slight differences in copy/move/delete semantics between fill and assign
should be irrelevant.

Reviewed By: @andrewjcg

Differential Revision: D1052036