Yii1 compatibility

removed YII_PATH constant from the framework to be compatible with Yii 1.1 and more flexible in general.

fixes #4501
code style?