Convert ext/curl to HNI

Convert ext/curl to HNI

Closes #1692

Reviewed By: @sgolemon

Differential Revision: D1155575

Pulled By: @scannell
Some fixes and move a bunch of tests that now passes

- Support persistant connections
- Small bug fix when calling data_seek and not having a result

Reviewed By: @ptarjan

Differential Revision: D1160110
Case-insensitive check for Accept-Encoding: gzip

We were using case-sensitive std::string::find for this. Use strcasestr
instead.

Reviewed By: @markw65

Differential Revision: D1164176
Fix bogus namespace error.

Don't bail out with an error if a hashbang precedes a namespace declaration
in a source file.

Reviewed By: @ptarjan

Differential Revision: D1160029
tcache.flush mallctl was renamed in jemalloc3, update

Since upgrading to jemalloc3 hhvm hasn't actually been flushing
the tcache during idle times.  That bug has also been masking a bug in
which we still try to purge thread.arena despite overriding jemalloc
narenas to be 1, so I have removed that code as well.

Reviewed By: @jasone

Differential Revision: D1157139
Fix Travis test errors

- Fix 2 tests by not using table test
- Move 1 test to bad until I figure out why it fails on travis

Reviewed By: @scannell

Differential Revision: D1164756
Fix typo in ext_mysqli.php

$opions -> $option

Reviewed By: @JoelMarcey

Differential Revision: D1158079
TypeAnnotation support for "Num" typehint.

Treat `Num` as a variant since we don't know
whether or not it'll be float or int.

Reviewed By: @scannell

Differential Revision: D1151399
Explicitly fclose() in file_{get,set}_contents()

to avoid needlessly running into open file descriptor limits when
relying on the GC to close files.