Fix bug #65579 (Using traits with get_class_methods causes segfault).

Specifically, this checks if there are trait aliases defined in the class scope
before attempting to dereference the first trait alias. This handles the case
where a trait alias was used in a child trait but no aliases exist in the
concrete class.
Merge branch 'PHP-5.4' into PHP-5.5
Avoid compiler warning
Merge branch 'PHP-5.4' into PHP-5.5
Merge branch 'PHP-5.5'