Added function imagepalettecopy to ext_gd

Summary: Closes #3338

Closes https://github.com/facebook/hhvm/pull/3344

Reviewed By: @sgolemon

Differential Revision: D1474062

Pulled By: svcscm
fix mb_convert_case when encoding set other than default

Summary: Closes https://github.com/facebook/hhvm/pull/3245

Reviewed By: @ptarjan

Differential Revision: D1447241

Pulled By: @sgolemon
Added functions imagewebp and imagecreatefromwebp

Summary: This PR implements the functions imagewebp and imagecreatefromwebp.

https://github.com/facebook/hhvm/pull/3330
Closes #3141.

Reviewed By: @ptarjan

Differential Revision: D1470972

Pulled By: @sgolemon
Correctted flaky test to not be flaky

Summary: Makes a flaky test not flaky

Reviewed By: @ptarjan

Differential Revision: D1474165