Fix GMP tests/crashes

Summary: This should fix some crashes and all bad tests other than 014, and 028.

I marked test 014 as flakey, as it is checking for wrong return values due to a bug in PHP.  It appears as though PHP is using the resource number as the factorial rather than the resource's value, giving unpridictable results (depends on how many resources have been used thus far)

Test 028 still fails as gmp_random is not implemented.
Closes https://github.com/facebook/hhvm/pull/3639

Reviewed By: @sgolemon

Differential Revision: D1530781
Include files in zend/bad/zip/

Summary: This was included in zend/good, but the importer didn't know of this.
Unfortunately it didn't fix a test
Closes https://github.com/facebook/hhvm/pull/3684

Reviewed By: @sgolemon

Differential Revision: D1541445
Fix undefined variable in Imagick::valid

Summary: Fixes #3682
Closes https://github.com/facebook/hhvm/pull/3683

Reviewed By: @sgolemon

Differential Revision: D1541444