travis-ci: Configure HHVM runtime

Travis-ci does not currently have an easy method to set custom ini
configuration for the hhvm-nightly test runner, so instead we will use
a custom test runner script and add command line parameters to enable
the desired HHVM behavior.

Bug: 73177
Change-Id: I07671ade6f1f281371083b4d6d35a2fe231b415d
hhvm: Detect json-c parser

Add detection for a json-c powered json_decode() implementation. Default
loose parsing behavior was previously attributed to HHVM, but additional
investigation has found that this is actually a "feature" of json-c.
HHVM optionally links with json-c for distributions that wish to avoid
being encumbered by the "shall be used for Good, not Evil" clause of the
JSON.org parser's license. The test case implementation stays the same,
but a feature flag style check is added to determine if the parser being
used is lenient or not.

Bug: 72778
Change-Id: Ieb8dddd2e324c90f45f2fc27ac13ab5fff733302
Avoid glibc iconv bug by using mb_convert_encoding

Iconv from Glibc 2.14 has a bug in handling the '//IGNORE' directive
which causes valid characters following the first invalid charter to be
skipped if the caller follows the documented semantics of their EILSEQ
error code [0]. PHP has effectively WONTFIX'ed working around this bug
in their iconv() implementation [1]. This makes the use of '//IGNORE'
with iconv basically useless. Luckily there is a work alike solution
documented by "orrd101 at gmail dot com" [2] that can be used to achieve
the desired result of stripping invalid characters from a string.

[0]: https://sourceware.org/bugzilla/show_bug.cgi?id=13541
[1]: https://bugs.php.net/bug.php?id=48147
[2]: http://php.net/manual/en/function.iconv.php#108643

Bug: 37665
Change-Id: Icf9e7deb73fdcea6ad074eb56153c5353064a929