Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop())

Initial fix was PHP stuff
This one is libgd fix.

- filter invalid crop size
- dont try to copy on invalid position
- fix crop size when out of src image
- fix possible NULL deref
- fix possible integer overfloow
Merge branch 'PHP-5.5' into PHP-5.6

* PHP-5.5:
  Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop())
Merge branch 'PHP-5.6'

* PHP-5.6:
  Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop())
minor fix on previous
Merge branch 'PHP-5.5' into PHP-5.6

* PHP-5.5:
  minor fix on previous
Merge branch 'PHP-5.6'

* PHP-5.6:
  minor fix on previous
Fixed bug #66298 (ext/opcache/Optimizer/zend_optimizer.c has dos-style ^M as lineend)

Use git blame -w to ingore the space changes
Merge branch 'PHP-5.5' into PHP-5.6
Fixed bug #66298 (ext/opcache/Optimizer/zend_optimizer.c has dos-style ^M as lineend)
Merge branch 'PHP-5.6'
Fix dos style eol in phpts
Merge branch 'PHP-5.5' into PHP-5.6
Fix one more test in dos style eol
Merge branch 'PHP-5.6'
Fix test fail
Merge branch 'PHP-5.5' into PHP-5.6
Merge branch 'PHP-5.6'
Sync with pecl/zip 1.12.4dev

- update bunled libzip to 0.11.2
- expose zip_file_set_external_attributes + zip_file_get_external_attributes
  with new methods:
	ZipArchive::setExternalAttributesName
	ZipArchive::setExternalAttributesIndex
	ZipArchive::getExternalAttributesName
	ZipArchive::getExternalAttributesIndex
Merge branch 'PHP-5.6'

* PHP-5.6:
  Sync with pecl/zip 1.12.4dev
NEWS