Clean up, optional initialization, logging to disk

Miscellaneous cleanup, including:
- Only initializing the profile data structure if requested
- Save the profile to disk with some frequency
- Move internal functions out of the header

Reviewed By: @jdelong

Differential Revision: D921078
Implement equality operator.

Abstract away the code for equality from Vector to BaseVector, so we can reuse it
in FrozenVector.

Reviewed By: @dariorussi

Differential Revision: D1006830
Fixing python serialization. Part one.

The first step is to merge SerializationPythonVariant and
UnserializationPythonVariant into PythonVariant. Even when the Variant
handles two different sets of types (Variant = object for unserialization
and Variant = PyObject* for serialization), FBSerializer was modified to
use templates instead of accessing types definitions in the Variant, so the
types defined in the PythonVariant are only used by Unserialization.

Next:
Specify a MutableStringType in the Variants (StringType in
old SerializerController is not necessarily equals to StringType in
VariantController).
Add PythonVariant as a trait.

Reviewed By: andrii

Differential Revision: D1003710
add test of direct array invocation to .cuf.php quicktest

Depends on D984939. Instead of copying the entire test,
 ensures that in each case with an array() callable is followed
 immediately by a direct call(). To start with, cases that cause
 fatals are commented out. I also renamed "foo" and "bar" to
 "meth" and "staticMeth", for readability.

Reviewed By: @jdelong

Differential Revision: D1002897
Documentation driven skeleton generator

Parses svn.php.net's docbook sources for an extension's API
and generates a Systemlib and Extension source file for it.

Reviewed By: @ptarjan

Differential Revision: D989163
Add ArrayInit based functions in VariantController.h

ArrayInit based reservemap, add, and createmap is more efficient. Add them
to VariantController.h for extensions.

Reviewed By: andrii

Differential Revision: D1007534
Remove the use->def chasing in cgSpillStack

We have a simplifier rule that does this now, and we want
CodeGenerator to work without relying on SSA form.
This also fixes a Str->Strb bug in ARM.

Reviewed By: @swtaarrs

Differential Revision: D1007836
Rename various `typedef' things to `type alias'

Reviewed By: @swtaarrs

Differential Revision: D1008398
support CSV in SplFileObject::current

Closes #1160

Reviewed By: @alexmalyshev

Differential Revision: D1008072
Support checking '@'type (soft types) at runtime.

This diff adds support for checking and raising a warning when a soft type (@Alite404Exception) fails. Soft type hints are useful
when converting code from untyped code (php) to typed code (hack).

Discussion: https://www.facebook.com/groups/165748143439038/permalink/690858800927967/.

Reviewed By: @dariorussi

Differential Revision: D926433
Allow refcount elimination around ArrayIdx

ArrayIdx was treated as "consumesRC", when it really doesn't.
Also move the decref of the default argument to be explicit in the IR
so it can be paired with preceding increfs.  If the default argument
is, in fact, used, it's the responsibility of the arrayIdx helper to
incref it.

Reviewed By: @swtaarrs

Differential Revision: D1008957
Don't close std(in|out|err) on request shutdown

BuiltinFile is supposed to be a wrapper around an existing FILE or
file descriptor, so it shouldn't close the underlying stream when being swept.

Reviewed By: @bertmaher

Differential Revision: D994199
posix_madvise(..., POSIX_MADV_DONTNEED) is a no-op

Apparently, there's no exact equivalent in linux, so its
treated as a no-op. What we *want* here, however, is exactly what
linux's madvise does.

Reviewed By: @jdelong

Differential Revision: D1007545
Fix printf warning on OS X

printf type mismatch warning on OS X (%ld for int64_t is not
true there)

Reviewed By: @edwinsmith

Differential Revision: D1009391
Support array-style access

Now we can do:

  $fv = FrozenVector {1, 2, 3};
  $x = $fv[0];

Reviewed By: @paroski

Differential Revision: D988684
Handle magic methods

Implement proper behaviour for:
  * __toString()
  * __get()
  * __set()
  * __isset()
  * __unset()

(unit tests passed, but permanently show up as "postponed)

Reviewed By: @dariorussi

Differential Revision: D1006156
Fix paramter inconsistency for RequestURI

Fix flipped parameters between declaration and definition for
RequestURI.

Closes #1168

Reviewed By: @JoelMarcey

Differential Revision: D1009413
Add materialization methods

We can now convert any collection toFrozenvVector() and FrozenVector to
any collection.

unit tests pass, but show up as "postponed" in phabricator

Reviewed By: @dariorussi

Differential Revision: D1006767
small framework runner changes

- Put a newline before the downloading message as it happened in the middle of the line a bunch of times
- Made the comparing message less verbose since it is printed all the time on every runner
- Renamed it "run" and made it execuatble (in line with `test/run`)
- Fixed a warning where the status is empty. Is that right to ignore it?
- Don't always generate `.expect` files
- Similarly, don't always generate the summary file. I don't really understand what you are trying to do with that one being checked in?

I don't really understand how to use this yet. My runs don't seem to give me the thumbs up, so either the expect files are too specific to @JoelMarcey's machine or the tests are flakey. Either way, we can't use this yet.

Reviewed By: @JoelMarcey

Differential Revision: D1009080