[0.5.0] Get PhalconEye working with Phalcon 2.0

This PR addresses a couple of first line issues with running the CMS with Phalcon 2.0.
It is purely for discussion as I didn't do any kind of detailed tests - just went thorugh installation fixing whatever I found and logged into admin. That's it.

There seem to be many B/C issues (usually minor) in Phalcon 2.0 which I hope will be detailed in some kind of migration process at some point.
There's even one PR for this https://github.com/phalcon/cphalcon/issues/3024

Using most recent version https://github.com/phalcon/cphalcon/commit/4b1cf968e7697a9eed82e4cc38837d2cb03a18ff
This function can be used outside this class. Don't delete it.