Some fixes

Hi
See you project it is a good idea to port some class from yii to ext for better performance
For generate it i added some fix for zephir
https://github.com/phalcon/zephir/pull/171
Follow me and Happy coding ^_^