Issue #2375213 by Fabianx: Implement trait support for PHP 5.4 and allow multiple namespaces

Used Symfony's implementation as it was best using PHP token parser.