add OPT_VERIFY_KEY, OPT_SORT_HOSTS, resetServerList()

Summary: Fixes #3615, #3616, #3617. A superset of #3827.

Thanks to@​keyurdg and@​adsr for helping me out!
Closes https://github.com/facebook/hhvm/pull/3833

Reviewed By: @ptarjan

Differential Revision: D1576206
Implement getImageSizeFromString()

Summary: Open a data stream to get the string as a stream which can be passed to the logic in f_getimagesize(). This logic is moved into a new function

The implementation of getImageSize() and getImageSizeFromString() could be moved to PHP, but I am not sure how to expose the C++ function to PHP land.

Fixes #3801

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

Reviewed By: @ptarjan

Differential Revision: D1576163