Redis fixes and tests

Summary: Fixed:
* `processDoubleResponse()` Redis returns self::TYPE_BULK for double/float
* $cmd should always be lowercase in `client()` for $cmd == 'list' comparison
* `doEval` / `script` should return null on error
* `self::lastError` should be null by default
* Script `$subcmd` parameter should be lowercased for comparison.

Added:
* Tests for client LIST command
* Tests for `incr` `incrBy` `decr` `decrBy` `incrByFloat`
* Missing `processClientListResponse`
* Set `self::lastError` on script error and tests for this
* `script()` returns to be compatible with phpredis and tests for these.
Closes #2603

Reviewed By: @ptarjan

Differential Revision: D1314240

Pulled By: @JoelMarcey
CMake DSO build system improvements

Summary: Allow dynamically loadable Zend compat extensions

Use the existing macro ZEND_GET_MODULE() to provide the necessary getModule() function.
In CMake, add macro HHVM_COMPAT_EXTENSION(), equivalent to HHVM_EXTENSION(), which will register a zend-compat extension.
Set the source language, so that it's not even necessary to rename the files. This makes it trivial to have a dual-targeted source tree.
Don't require full source tree for building DSOs:

Install header files
Install CMake files needed by hphpize
Fix hphpize to look for headers and CMake files in the installed directory
Rename php_config.h-linux to php_config-linux.h and php_config.h-darwin to php_config-darwin.h, so that it will be picked up by *.h glob for installation. Also helps with syntax highlighting.
Also:

Add an install target to the makefile of DSOs. Install to a version-dependent directory, similar to what PHP does. I chose lib/hphp over lib/hhvm for consistency with include/hphp.

Closes #2610

Reviewed By: @ptarjan

Differential Revision: D1330392

Pulled By: @JoelMarcey
FastCGI: Use SCRIPT_FILENAME as the PHP script to run

Summary: The goal is to fix the issue #1938.

As discussed in this issue, I propose to add a method `getScriptFilename()` to the `Transport` class. In the FastCGI case, this returns the value of `SCRIPT_FILENAME`, which was provided by the webserver. This fixes a bug where `PATH_TRANSLATED` is meaningless (in HHVM's point of view) if the URL contains a `PATH_INFO`.

While here, the code now makes sure `$_SERVER['DOCUMENT_ROOT']` doesn't end with a `/`.

I checked against all combinations of Apache or Yaws as the webserver, and php-fpm or HHVM as the PHP interpreter. In all cases, the values of `$_SERVER['DOCUMENT_ROOT']`, `$_SERVER['SCRIPT_NAME']`, `$_SERVER['SCRIPT_FILENAME']`, `$_SERVER['PATH_INFO']` and `$_SERVER['PATH_TRANSLATED']` were the same.
Closes #2510
Fixes #1938

Reviewed By: @ptarjan

Differential Revision: D1329650

Pulled By: @JoelMarcey
Add ref-inner-type storage to hhbbc

Summary: This doesn't actually use it for anything, just putting the framework in
place.

Reviewed By: jdelong

Subscribers: ps, hphp-diffslists

Differential Revision: D1330462

Tasks: 3619895
Enable collection buffer sharing for Set

Summary: This diff enables collection buffer sharing for Set. To enable buffer
sharing it was necessary to make some adjustments to how iterators work
for Sets.

Naively sprinkling calls to check for an immutable buffer at the beginning
every mutating method made things a bit inefficient, so I spent some time
to refactor some of the core operations such as add(), grow(), and reserve().

Reviewed By: eletuchy

Subscribers: trunkagent, hphp-diffslists, ps, dmitrys, joelm

Differential Revision: D1324975
Use profiling information to decide code placement for ReleaseVVOrExit

Summary: When freeing extra args is somewhat likely, put the call to
ExtraArgs::deallocate in code.main instead of code.stubs.

Reviewed By: bsimmers

Subscribers: hphp-diffslists, ps

Differential Revision: D1328985

Tasks: 4313291
Reverting channeled json

Summary: It was decided to revert the feature.
Diffs reverted:
D1189915
D1172001

Their corresponding commits:
d44c0de5a6813c0a7583204780ab71ce1f108461
88aa629f3333426100f4261fe2d1ddfd271330b7

Reviewed By: afrind, mwilliams

Subscribers: agallagher, trunkagent, hphp-diffslists, ps, bmatheny

Differential Revision: D1318966

Tasks: 4296466
More zend-string smart_malloc conversions

Summary: Convert some more php5 string APIs to smart_malloc

Reviewed By: smith

Subscribers: trunkagent, hphp-diffslists, ps

Differential Revision: D1330112
Compatibility with Fedora packaging standards

Summary: This modification is to add PIC compilation flag when the system building the application is a Fedora distribution.
This address the comments in issue #2615

Closes #2687
Fixes #2615

Reviewed By: ptarjan

Subscribers: hphp-diffslists, ps, sgolemon

Differential Revision: D1331397

Pulled By: @JoelMarcey
Don't guard annotate() on inlining

Summary: With FCallD we no longer have cross-tracelet information in the
call map so we don't need to guard on inling anymore.

Reviewed By: bsimmers

Subscribers: trunkagent, hphp-diffslists, ps, mwilliams

Differential Revision: D1329464

Tasks: 4333916