Drop redundant casting code from ext/filter
Fix casts in GD

Using convert_to_* after ZVAL_COPY is unsafe.
Add notes about get_class_entry/get_class_name to UPGRADING