remove anything after a ? too

Summary: Heroku is running into this problem with their current apache rewrite rules

Reviewed By: @JoelMarcey

Differential Revision: D1374358
Fixes HHVM-3.1 build.

This fixes the "'m_scriptFilename' was not declared in this scope" build error
caused by facebook/hhvm@740f281.
Merge pull request #3064 from whatthejeff/fix-3.1-build

Fixes HHVM-3.1 build.
Merge remote-tracking branch 'origin/HHVM-3.1' into newrelic-profiling-3.1
pull in update from php-5 for mb_convert_case with MB_CASE_TITLE

Summary: From https://github.com/php/php-src/blob/af6c11c5f060870d052a2b765dc634d9e47d0f18/ext/mbstring/php_unicode.c#L311
Closes #2598

Reviewed By: @fredemmott

Differential Revision: D1330380