Yii1 compatibility

removed YII_PATH constant from the framework to be compatible with Yii 1.1 and more flexible in general.

fixes #4501
Why not using `YII2_PATH`?